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.

Synopsis

Variable name:

pageContext

EL expression

${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

Constructor

public PageContext( )

Creates an instance of the PageContext class. Typically, an instance is created and initialized by the JspFactory class.

Methods

public abstract Object findAttribute(String name)

Searches for the named attribute in page, request, session (if valid), and application scope(s) in order and returns the associated value or null if the attribute is not found.

public abstract void forward(String relativeUrlPath)

throws ServletException, java.io.IOException

This method forwards the current request to another active component, such as a servlet or JSP page, in the application. If the specified URI starts with a slash, it’s interpreted as a context-relative path, otherwise as a page-relative path.

The response ...

Get JavaServer Pages, Second 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.