Name
pageContext
Variable name:
pageContext
Class name:
javax.servlet.jsp.PageContext
Extends:
None
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
Description
A PageContext
instance provides access to all the
JSP scopes and several page
attributes, and offers
a layer above the container-implementation details to enable a
container to generate portable JSP implementation classes. The JSP
page scope is represented by PageContext
attributes. A unique instance of this object is created by the web
container and assigned to the pageContext
variable
for each request.
Constants
public static final int PAGE_SCOPE = 1; public static final int REQUEST_SCOPE = 2; public static final int SESSION_SCOPE = 3; public static final int APPLICATION_SCOPE = 4;
Constructor
-
public PageContext()
Creates an instance of the
PageContext
class. Typically, theJspFactory
class creates and initializes the instance.
Methods
-
public abstract Object findAttribute(String name)
Searches for the named attribute in the page, request, session (if valid), and application scope(s) in order and returns the associated value. If the attribute is not found, returns
null
.-
public abstract void forward(String relativeUrlPath)
throws ServletException, java.io.IOException
Forwards the current request to another active component in the application, such as a servlet or JSP page. If the specified ...
Get JavaServer Pages Pocket Reference 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.