Object Name |
Description |
Scope |
Data Type |
Request |
This object encapsulates the details (parameters, attributes, header labels, and data) of HTTP requests generated by WEB browsers or other clients ); |
Request (user request period) |
Subtype of ServletRequest |
Response |
This object encapsulates the output returned to the HTTP client and provides the page author with the method of setting the response header and status code. It is often used to set HTTP headers, add cookies, set the type and status of the response content, and send HTTP redirection and encoded URLs; |
Page (page execution period) |
Subtype of ServletResponse |
Session |
HttpSession is an object similar to a hash table related to a single WEB browser session. It exists between HTTP requests and can store any type of objects, if you do not need to track session objects between requests, you can specify session = "false" in the page command. Note: @ 1; |
Session) |
Javax. servlet. http. HttpSession type |
Application |
The servlet environment calls getServletConfig (). the getContext () method provides the following methods: Server version, application-level initialization parameters, absolute path of resources in the application, and registration information. getRealPath () is a commonly used method (); |
Application (throughout the program running) |
Javax. servlet. ServletContext type |
Config |
The object provides some configuration information. Common methods include getInitParameter and getInitParameterNames to obtain the Servlet initialization parameters. |
Page (page execution period) |
Javax. servlet. ServletConfig type |
Page |
The page command defines various attributes of a JSP page. No matter where the page command appears on a JSP page, it serves the entire JSP page, in order to keep the program readable and follow good programming habits, the page instruction should be placed at the beginning of the entire JSP page; |
Page (page execution period) |
Java. lang. Object Type |
Out |
Indicates the object of the output stream; |
Page (page execution period) |
Javax. servlet. jsp. JspWriter type |
Exception |
A catch block on the JSP error page has benefited but not captured java. lang. any instance of Throwable is directed to the URI of errorPage. Note: exception is valid only when the page command has the attribute isErrorPage = "true; |
Page (page execution period) |
Java. lang. Throwable type |
PageContext |
The PageContext class defines a forward method and two include methods to simplify and replace RequestDispatcher. the forward and include methods. This object provides the ability to query and modify attributes at all four levels of scopes. It also provides methods to forward requests to other resources and include other resources; |
Page (page execution period) |
Javax. servlet. jsp. PageContext (abstract class) Type |