Review: 
Using HTTP Request Headers
Many servlet tasks can only be 
accomplished by making use of HTTP 
headers coming from the browser
Use request.getHeader for arbitrary header
Cookies, authorization info, content length, 
and content type have shortcut methods
Most important headers you read directly
Accept
Accept Encoding
Connection
Referer
User Agent
99
Servlets
www.corewebprogramming.com
Review: 
Generating the HTTP Response
Many servlet tasks can only be 
accomplished through use of HTTP status 
codes and headers sent to the browser
Two parts of the response
Status line 
In general, set via response.setStatus
In special cases, set via 
response.sendRedirect and response.sendError 
Response headers
In general, set via response.setHeader
In special cases, set via response.setContentType, 
response.setContentLength, response.addCookie, 
and response.sendRedirect 
100
Servlets
www.corewebprogramming.com
50




  

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