Accessing HTTP Servlet Variables
The JSP pages you write are translated into servlets that process the HTTP GET and POST requests. The JSP code can access servlet information using implicit objects defined for each page. These implicit objects are pre-declared variables that you can reference from the Java code on your JSP. The most commonly used objects are shown in Table 13.3.
Reference Name | Class | Description |
---|---|---|
config | javax.servlet.ServletConfig | The servlet configuration information for the page |
request | subclass of javax.servlet.ServletRequest | Request information for the current HTTP request |
session | javax.servlet.http.HttpSession | The servlet session object for the client |
out | javax.servlet.jsp.JspWriter | A subclass ... |
Get Sams Teach Yourself J2EE™ in 21 Days now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.