Introduction to JSP built-in objects (7) PageContext objects

Source: Internet
Author: User

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"%>    
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.