PageContext implies objects corresponding to the Javax.Servlet.jsp.PageContext type object, the implied object is automatically added to PageContext, and you can get the servlet object corresponding to the JSP-related implied object, Like getRequest () can get servletRequest, getServletConfig () can get servletconfig, getsession () can get httpsession, etc. The servlet object that provides the hidden object is not the main role of PageContext. Its main feature is provided with a single interface to manage various public objects (like httpsession, servletcontext, servletconfig, servletRequest, servletresponse, etc.), A single API manages the range of properties and more. We have previously used SetAttribute () to set the session to set the properties that can be shared, using the properties set by the session can be shared in the same process, except for the session, there is PageContext, request, Application can also be used. The method such as setAttribute () (for details, please refer to the API file) to set the properties that can be shared, but the attribute set by these four objects is different. Using the attribute item set by PageContext, its shared range is limited to the same JSP page, using the attribute item set by Request, which can share (including Forward to other JSP pages), the attribute object set by the session object during the same request processing It is limited to the same process action, and the attribute set by the Application object, the JSP page in the entire Web application can be shared. The following Application is an example, you can set some item as an attribute to Application, then another JSP page can get this attribute object when appropriate, for example: <% string attr = "string object"; Out.println ("Set the property to Application:" attr); Application.setttribute ("str", attr);%> We first connect this JSP page to execute the property setting, then we will connect this JSP page: <% string Attr = (String) Application.getaTRibute ("Str"); out.println ("gets the application attribute:" attr);%> Because we have set the string object settings as an attribute in the Application, we can be above this The previously set objects are obtained, the same reason, you can also set the properties to PageContext, Request, Session, and other objects, as long as in the allowable range, you can acquire the set attribute object.