Java Web Nine large built-in objects (i)

Source: Internet
Author: User
Tags java web

A total of nine built-in objects are defined in the JSP, namely:

*request HttpServletRequest;

*response HttpServletResponse;

*session HttpSession;

Page this (the JSP page);

*application ServletContext;

Config servletconfig;

Exception display abnormal, special case use;

The out JspWriter can operate on the data buffer;

PageContext use common Java class to access Web resources, commonly used as custom tags;

Nine built-in objects can also be divided into:

Output input object: Request object Response object out object;

Communication Control object: PageContext Object Session object Application object;

Servlet object: Page Object config object;

Error Handling object: Exception object;

Four scopes:

Application; Global scope, server boot to stop

Session; Session scope, user first Access creates a scope, life cycle: Session timeout or server forced shutdown;

PageContext (Page); Within a JSP page

Request; Request scope, one request is dead.

Nine large built-in object scope scopes:

Request object scope: requests;

Response Response Object scope: page;

PageContext page Context Objects scope: page;

Session Conversation Object scope: session;

Application Application Object scope: application;

Out output object scope: Page;

Config Configuration object scope: Page;

Page object scope: pages;

Exception Exception Object scope: Page; Can be used only on pages that contain iserrorpage= "true"

Java Web Nine large built-in objects (i)

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.