Name
pageContext
Synopsis
A PageContext
instance provides access to all the
JSP scopes and several page attributes. It offers a layer above the
container-implementation details that enables a container to generate
portable JSP implementation classes. The JSP page scope is
represented by PageContext
attributes. The web
container assigns a unique instance of this class to the
pageContext
variable for each request.
The PageContext
is provided to tag handler classes
to give them access to the runtime context data. The class was
refactored in JSP 2.0 to extend a generic context class:
JspContext
. All nonservlet specific methods were
moved to the JspContext
class, described in the
Tag Handler Types section. Classic tag handlers are given an instance
of PageContext
but the new simple tag handler API
uses the new JspContext
type instead. In a
servlet-based JSP container, the instance provided to a simple tag
handler is always a PageContext
, so tag handlers
can safely cast the JspContext
instance to a
PageContext
. These changes were made to allow the
simple tag handler mechanism to be used in nonservlet based
environments in the future.
Synopsis
Variable name: |
pageContext |
EL expression |
${pageContext} |
Class name: |
javax.servlet.jsp.PageContext |
Extends: |
|
Implements: |
None |
Implemented by: |
A concrete subclass of this abstract class is provided as an internal container-dependent class |
JSP page type: |
Available in both regular JSP pages and error pages |
Fields ...
Get JavaServer Pages, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.