JSP-built-in object

Source: Internet
Author: User
Built-in object : Tomcat helped us instantiate it.
Built-in object Class
Pagecontext Javax. servlet. jsp. pagecontext
Request Javax. servlet. http. httpservletrequest
Response Javax. servlet. http. httpservletresponse
Session Javax. servlet. http. httpsession
Config Javax. servlet. servletconfig
Application Javax. servlet. servletcontext
Out Javax. servlet. jsp. jspwriter
Page Java. Lang. Object
Exception Java. Lang. throwable

 

1,Built-in object(9)

There are four types: (1) servlet-related hidden objects: Page, config; (2) hidden objects related to input/output: Out, request, and response; (3) for containers, data is saved to the containers: Session, application, and pagecontext;

(4) hidden objects related to error: exception;

 

2,Two Methods of attribute(Set and obtain attributes)

-Set attributes: public abstract void setattribute (Java. Lang. string name, java. Lang. Object attribute)

-Get attribute: public abstractJava. Lang. ObjectGetattribute (Java. Lang. string name)

 

3,Storage range of the four attributes (The attribute storage range refers to the number of pages that a built-in object can save and continue to use.)

Page, request, session, Application

(1) page range (pagecontext): valid for one page. redirection is invalid.

(2) request range: valid for server redirect and invalid for client redirect.

(3) Session range: The jump is valid and the new browser is invalid.

(4) Application Scope: valid for all users and invalid for restarting the server.

 

 

Http://blog.csdn.net/xiazdong/article/details/6848382

Http://blog.sina.com.cn/s/blog_5329b1d80100ajm7.html

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.