js| Objects | Built-in objects
(1) HttpServletRequest class's Request object
Function: Represents the requesting object, which is primarily used to accept data that the client transmits to the server side through the HTTP protocol connection.
(2) The Respone object for the HttpServletResponse class
Action: Represents a response object that is used primarily to send data to the client
(3) The Out object
of the JspWriter class function: Primarily for outputting data to the client; The
out base class is the session object for the JspWriter
(4) HttpSession class
Role: Mainly used to save each user information separately, the session associated with the request;
Session state Maintenance is a problem that Web application developers must face.
(5) Servletcontex class Application Object
Role: Mainly used to save user information, code snippets of the operating environment;
It is a shared built-in object in which multiple users in a container share a Application object, so that the information it holds is shared by all users. The
(6) PageContext class PageContext objects
Function: Manage Web page properties, wrap the context of a page for JSP pages, manage access to named objects that belong to a particular visible part of the JSP, and its creation and initialization are done by the container.
(7) The Config object for the ServletConfig class
function: A code fragment configuration object that represents the configuration of the servlet.
(8) the page (equivalent to this) object of the object
function: Processing JSP Web pages, is an instance of the object class, refers to the JSP implementation class instance, that is, it is also JSP itself, only within the scope of the JSP page is legitimate.
(9) Exception
Action: Errors and exceptions that occur when processing JSP file Execution
can only be used in the error page. The premise is: in the page instruction to have iserrorpage=true page;
such as:a.jsp: <%@ page contenttype= "text/html;charset=gb2312" Errorpage= "error.jsp"%>
error.jsp:<%@ page contenttype= "text/html;charset=gb2312" iserrorpage= "true"%>
: You can use the exception built-in object in the Error.jsp page, using the following:
<%=exception.getmessage ()%>
Note: The properties in PageContext are shared by default on the current page;
The attributes in the session are shared in the current session;
The genus in the ServletContext object is shared for all pages;