O'Reilly logo

JavaServer Pages, Second Edition by Hans Bergsten

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required