|
Tutorials :
Server-Side Web Applications Using Servlets and JSP :
|
| Contents |
| Introduction to CGI Variables |
| Servlet Equivalent of Standard CGI Variables |
| Example: Reading the CGI Variables |
If you come to Java servlets from traditional CGI, you are probably used to the idea of "CGI Variables".
These are a somewhat eclectic collection of information about the request.
Some are derived from the HTTP request line and headers (e.g. the part of the URI that came after the
question mark and typically contains the form data, or the Content-Length header), some are derived from
the socket itself (e.g. the name and IP address of the requesting host), and some are derived from server
installation parameters (e.g. the mapping of URLs to actual paths).
This tutorial is now available as a book: Core Servlets and JavaServer Pages by Marty Hall, published by Sun Microsystems Press. Read all about it at CoreServlets.com
Find out about becoming a Java Boutique sponsor.