Name

JspContext

Synopsis

The JspContext class represents an interface to the generic runtime environment available to a simple tag handler, even in a nonservlet environment. In a servlet-based JSP container, an instance of the PageContext subclass, described in the Implicit Variables section, is always used.

Synopsis

Class name:

javax.servlet.jsp.JspContext

Extends:

None

Implements:

None

Implemented by:

Internal container-dependent class; most containers use the reference implementation of the class (developed in the Apache Jakarta project)

Constructor

public JspContext( )

Creates a new JspContext instance.

Methods

public abstract Object findAttribute(String name)

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

public abstract Object getAttribute(String name)

Returns the object associated with the specified attribute name in the page scope or null if the attribute is not found.

public abstract Object getAttribute(String name, int scope)

Returns the object associated with the specified attribute name in the specified scope or null if the attribute is not found. The scope argument must be one of the int values specified by the PageContext static scope variables.

public abstract java.util.Enumeration getAttributeNamesInScope(int scope)

Returns an enumeration of String objects containing all attribute names for the specified scope. The scope argument ...

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.