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