We've learned the main four objects of the JSP built-in objects----page, request, response, session, and application, and it's important to have a pagecontext in the built-in objects because it is, to some extent, omnipotent, Because some of its methods can replace four of built-in objects.
Introduction to PageContext objects
The PageContext object is an instance of the Javax.servlet.jsp.PageContext class, which mainly represents the context of a JSP page, which, in addition to the previously explained attribute operations, defines some of the following methods that can make PageContext an omnipotent The object.
PageContext main function is in the JSP file support, must remember PageContext rely on the above method, can be said to be powerful, can operate a variety of built-in objects.
PageContext is a powerful built-in object, so later in the lecture on high-end JSP programming, TAG library programming is basically to use the PageContext object completed.
When it comes to powerful features, let's take a look at why it's powerful. Why you can manipulate almost all of the built-in objects.
Use PageContext to complete a jump function. Request to jump from pagecontext_01.jsp to pagecontext_02.jsp.
pagecontext_01.jsp
<%@ page language= "java" contenttype= "text/html" pageencoding= "GBK"%>