Common HTTP 1.1 Response 
Headers (Continued)
Location
The URL to which browser should reconnect.
Use sendRedirect instead of setting this directly. 
Refresh
The number of seconds until browser should reload page. 
Can also include URL to connect to.  See following 
example.
Set Cookie
The cookies that browser should remember. Don't set this 
header directly; use addCookie instead.
WWW Authenticate
The authorization type and realm needed in Authorization 
header. See details in More Servlets & JavaServer Pages.
63
Servlets
www.corewebprogramming.com
Persistent Servlet State and 
Auto Reloading Pages
Idea: generate list of large (e.g., 150 digit) 
prime numbers
Show partial results until completed
Let new clients make use of results from others
Demonstrates use of the Refresh header
Shows how easy it is for servlets to 
maintain state between requests
Very difficult in traditional CGI 
Also illustrates that servlets can handle 
multiple simultaneous connections
Each request is in a separate thread
Synchronization required for shared data
64
Servlets
www.corewebprogramming.com
32




  

Home

About Services Network Support FAQ Order Contact
 

Servlet Web Hosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting 

Lunarwebhost.net  Business web hosting division of Vision Web Hosting Inc. All rights reserved