JSP-Nine built-in objects

 

The built-in object is the object that is automatically generated and declared when the JSP file is translated into the corresponding Servlet file. We can use it directly in the JSP page

Built-in objects are used in JSP pages, using local code blocks or script segment statements, and cannot be used in global script code blocks

 

1. pageContext:

  Page context object, in which other built-in objects are sealed, that is, the running information of the current jsp is sealed

  Each JSP file has a pageContext object, its scope is the current page

2. request:

  The object that archives the current request data, created by the Tomcat server

3. response:

  Response object, used to respond to the request processing result to the browser

4. application:

  That is, the ServletContext object, there is only one project, and the scope is within the project

5. session:

  Used to store shared data of different requests of users

6. out:

  Response object, used internally by JSP, response object with buffer, efficiency is higher than response object

7. page:

  The object representing the current JSP, which is this

8. exception:

  Exception object, which stores the current exception information

  Note: To use this object, you need to use the attribute isErrorPage = "true" in the page directive to enable

9. config:

  ServletConfig object

 

Guess you like

Origin www.cnblogs.com/mpci/p/12671372.html