(1) Out object
An out object represents a page output stream, which is usually used to output variable values and Constants on the page. Generally, the out object can be used in the output expression to achieve the same effect.
In servlet: printwriter out = response. getwriter ()
Out. println ();
The output expression can be used to replace all the places where the out clause is used, and the output expression is more concise. The essence of the expression is out. write (·······)
(2) pagecontext object
Indicates the page context. This object is mainly used to access Shared data between JSP. You can use pagecontext to access the variables in the range of page, request, session, and application.
Getattribute (string name): Get the attribute within the page range.
Getattribute (string name, int scope) gets the name attribute within the specified range. scope can be the following four values:
Pagecontext. page_scope corresponds to page range 1
Pagecontext. request_scope corresponds to request range 2
Pagecontext. session_scope corresponds to session range 3
Pagecontext. application_scope corresponds to application range 4