Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
6
Chapter 1 Overview of Servlets and JavaServer Pages
3. Generate the results. 
This process may require talking to a database, executing an 
RMI or CORBA call, invoking a legacy application, or comput 
ing the response directly.
4. Format the results inside a document. 
In most cases, this involves embedding the information inside 
an HTML page.
5. Set the appropriate HTTP response parameters. 
This means telling the browser what type of document is being 
returned (e.g., HTML), setting cookies and caching parameters, 
and other such tasks.
6. Send the document back to the client. 
This document may be sent in text format (HTML), binary for 
mat (GIF images), or even in a compressed format like gzip that 
is layered on top of some other underlying format.
Many client requests can be satisfied by returning pre built documents,
and these requests would be handled by the server without invoking servlets.
In many cases, however, a static result is not sufficient, and a page needs to
be generated for each request. There are a number of reasons why Web
pages need to be built on the fly like this:
The Web page is based on data submitted by the user. 
For instance, the results page from search engines and 
order confirmation pages at on line stores are specific to 
particular user requests.
The Web page is derived from data that changes 
frequently. 
For example, a weather report or news headlines page might 
build the page dynamically, perhaps returning a previously built 
page if it is still up to date. 
The Web page uses information from corporate 
databases or other server side sources. 
For example, an e commerce site could use a servlet to build a 
Web page that lists the current price and availability of each 
item that is for sale. 
In principle, servlets are not restricted to Web or application servers that
handle HTTP requests, but can be used for other types of servers as well. For
Second edition of this book: www.coreservlets.com; Sequel: www.moreservlets.com.
Servlet and JSP training courses by book's author: courses.coreservlets.com.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

jsp web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Jsp Web Hosting Cheapest Web Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved