Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
524
Appendix A
Servlet and JSP Quick Reference
Example Form 
ThreeParamsForm.html
  Collecting Three Parameters

Collecting Three Parameters

  First Parameter:  
  Second Parameter: 
  Third Parameter:  
  
    
  
Filtering HTML Specific Characters
  Must replace 
<
, 
>
, 
"
, 
&
 with 
<
, 
>
, 
"
, and 
&
. Use 
ServletUtilities.filter(htmlString)
 for this substitution. 
See Section 3.6.
A.4 Handling the Client Request: 
HTTP Request Headers
Methods That Read Request Headers
These are all methods in 
HttpServletRequest
.
  public String getHeader(String headerName) 
Returns value of an arbitrary header. Returns 
null
 if header not in 
request.
  public Enumeration getHeaders(String headerName) 
Returns values of all occurrences of header in request. 2.2 only.
  public Enumeration getHeaderNames() 
Returns names of all headers in current request.
  public long getDateHeader(String headerName) 
Reads header that represents a date and converts it to Java date format 
(milliseconds since 1970).
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