Common HTTP 1.1 Request 
Headers (Continued)
In HTTP 1.0, keep alive means browser can handle 
persistent connection. In HTTP 1.1, persistent connection 
is default. Persistent connections mean that the server can 
reuse the same socket over again for requests very close 
together from the same client
Servlets can t do this unilaterally; the best they can do is 
to give the server enough info to permit persistent 
connections. So, they should set Content Length with 
setContentLength (using ByteArrayOutputStream to 
determine length of output). See example in Core Servlets 
and JavaServer Pages.
Gives cookies previously sent to client. Use getCookies, 
not getHeader. (See later slides)
Common HTTP 1.1 Request 
Headers (Continued)
Indicates host given in original URL 
This is a required header in HTTP 1.1. This fact is 
important to know if you write a custom HTTP client 
(e.g., WebClient used in book) or telnet to a server and 
use the HTTP/1.1 version
If Modified Since
Indicates client wants page only if it has been changed 
after specified date
Don't handle this situation directly; implement 
getLastModified instead. See example in Core Servlets 
and JavaServer Pages Chapter 2



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  Business web hosting division of Vision Web Hosting Inc. All rights reserved