Object Name |
Describe |
Scope |
Data type |
Request |
This object encapsulates the details (parameters, attributes, headers, and data) of HTTP requests generated by Web browsers or other clients; |
Request (user requested period) |
ServletRequest of the child type |
Response |
This object encapsulates the output returned to the HTTP client and provides a way for the page author to set response headers and status codes. Often used to set HTTP headers, add cookies, set the type and status of response content, and send HTTP redirects and coded URLs; |
page (pages execution period) |
Servletresponse of the child type |
Session |
Primarily used to track conversations; HttpSession is a hash-like object that is associated with a single Web browser session, exists between HTTP requests, can store any type of object, and if you do not need to track session objects between requests, you can specify session= in the page directive by specifying the "False", note: @1; |
Session (during sessions) |
Javax.servlet.http.HttpSession type |
Application |
The context of the servlet is obtained by calling the Getservletconfig(). GetContext () method, which provides information about the server version, application-level initialization parameters, and the absolute path of the resource within the application, the way in which it is registered, and common methods Getrealpath () ; |
Application (whole program running period) |
Javax.servlet.ServletContext type |
Config |
Object provides configuration information, and commonly used methods include Getinitparameter and getinitparameternames to obtain the parameters for servlet initialization. |
page (pages execution period) |
Javax.servlet.ServletConfig type |
Page |
The page directive is used to define the various attributes of the JSP page, regardless of where the page instruction appears in the JSP pages, it acts as the entire JSP page, in order to keep the program readable and follow good programming habits, the page instruction is best placed at the beginning of the entire JSP page; |
page (pages execution period) |
Java.lang.Object type |
Out |
An object representing the output stream; |
page (pages execution period) |
Javax.servlet.jsp.JspWriter type |
exception |
Any instance of a java.lang.Throwable that has been benefited from a catch block in the JSP error page, but not captured, is passed to the ErrorPage URI, note: Exception is valid only if there is a property iserrorpage= "true" in the page directive; |
page (pages execution period) |
Java.lang.Throwable type |
PageContext |
A forward method and two include methods are defined in the PageContext class to simplify and replace Requestdispatcher.forward methods and include methods respectively; This object provides property query and modification capabilities at all four scoping levels, and it also provides methods for forwarding requests to other resources and including other resources; |
page (pages execution period) |
Javax.servlet.jsp.PageContext (abstract Class) type |