javax.servlet.jsp
Class PageContext

java.lang.Object
  extended by javax.servlet.jsp.JspContext
      extended by javax.servlet.jsp.PageContext
Direct Known Subclasses:
PageContextImpl

public abstract class PageContext
extends JspContext


Field Summary
static java.lang.String APPLICATION
           
static int APPLICATION_SCOPE
           
static java.lang.String CONFIG
           
static java.lang.String EXCEPTION
           
static java.lang.String OUT
           
static java.lang.String PAGE
           
static int PAGE_SCOPE
           
static java.lang.String PAGECONTEXT
           
static java.lang.String REQUEST
           
static int REQUEST_SCOPE
           
static java.lang.String RESPONSE
           
static java.lang.String SESSION
           
static int SESSION_SCOPE
           
 
Constructor Summary
PageContext()
           
 
Method Summary
abstract  void forward(java.lang.String relativeUrl)
          Forwards the request relative to the current URL.
abstract  java.lang.Object getAttribute(java.lang.String name)
          Gets the named page attribute.
 ErrorData getErrorData()
          Returns an error data instance.
abstract  java.lang.Exception getException()
          Returns the exception for error pages.
abstract  JspWriter getOut()
          Returns the current output for the page.
abstract  java.lang.Object getPage()
          Return the servlet object for the page.
abstract  ServletRequest getRequest()
          Returns the ServletRequest for the page.
abstract  ServletResponse getResponse()
          Returns the ServletResponse for the page.
abstract  ServletConfig getServletConfig()
          Returns the servletConfig for the JSP page.
abstract  ServletContext getServletContext()
          Returns the servletContext (application object) for the request.
abstract  HttpSession getSession()
          Returns the request's session.
abstract  void handlePageException(java.lang.Exception e)
          Internal routine to support errorPages.
abstract  void handlePageException(java.lang.Throwable t)
          Internal routine to support errorPages
abstract  void include(java.lang.String relativeUrl)
          Includes the a page relative to the current URL.
abstract  void include(java.lang.String relativeUrl, boolean flush)
          Includes the a page relative to the current URL.
abstract  void initialize(Servlet servlet, ServletRequest request, ServletResponse response, java.lang.String errorPageURL, boolean needsSession, int bufferSize, boolean autoFlush)
          Internal routine to initialize the PageContext for a page.
 BodyContent pushBody()
          Internal routine to support BodyTags.
abstract  void release()
          Internal routine to free PageContext resources at the end of a page.
abstract  void removeAttribute(java.lang.String name)
          Removes the named page attribute.
abstract  void setAttribute(java.lang.String name, java.lang.Object attribute)
          Sets the named page attribute.
 
Methods inherited from class javax.servlet.jsp.JspContext
findAttribute, getAttribute, getAttributeNamesInScope, getAttributesScope, getELContext, getExpressionEvaluator, getVariableResolver, popBody, pushBody, removeAttribute, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PAGE_SCOPE

public static final int PAGE_SCOPE
See Also:
Constant Field Values

REQUEST_SCOPE

public static final int REQUEST_SCOPE
See Also:
Constant Field Values

SESSION_SCOPE

public static final int SESSION_SCOPE
See Also:
Constant Field Values

APPLICATION_SCOPE

public static final int APPLICATION_SCOPE
See Also:
Constant Field Values

PAGE

public static final java.lang.String PAGE
See Also:
Constant Field Values

PAGECONTEXT

public static final java.lang.String PAGECONTEXT
See Also:
Constant Field Values

REQUEST

public static final java.lang.String REQUEST
See Also:
Constant Field Values

RESPONSE

public static final java.lang.String RESPONSE
See Also:
Constant Field Values

CONFIG

public static final java.lang.String CONFIG
See Also:
Constant Field Values

SESSION

public static final java.lang.String SESSION
See Also:
Constant Field Values

OUT

public static final java.lang.String OUT
See Also:
Constant Field Values

APPLICATION

public static final java.lang.String APPLICATION
See Also:
Constant Field Values

EXCEPTION

public static final java.lang.String EXCEPTION
See Also:
Constant Field Values
Constructor Detail

PageContext

public PageContext()
Method Detail

getAttribute

public abstract java.lang.Object getAttribute(java.lang.String name)
Gets the named page attribute.

Specified by:
getAttribute in class JspContext
Parameters:
name - of the attribute

setAttribute

public abstract void setAttribute(java.lang.String name,
                                  java.lang.Object attribute)
Sets the named page attribute.

Specified by:
setAttribute in class JspContext
Parameters:
name - name of the attribute
attribute - non-null attribute value.

removeAttribute

public abstract void removeAttribute(java.lang.String name)
Removes the named page attribute.

Specified by:
removeAttribute in class JspContext

getOut

public abstract JspWriter getOut()
Returns the current output for the page.

Specified by:
getOut in class JspContext

getSession

public abstract HttpSession getSession()
Returns the request's session.


getPage

public abstract java.lang.Object getPage()
Return the servlet object for the page.


getRequest

public abstract ServletRequest getRequest()
Returns the ServletRequest for the page.


getResponse

public abstract ServletResponse getResponse()
Returns the ServletResponse for the page.


getException

public abstract java.lang.Exception getException()
Returns the exception for error pages.


getServletConfig

public abstract ServletConfig getServletConfig()
Returns the servletConfig for the JSP page.


getServletContext

public abstract ServletContext getServletContext()
Returns the servletContext (application object) for the request.


forward

public abstract void forward(java.lang.String relativeUrl)
                      throws ServletException,
                             java.io.IOException
Forwards the request relative to the current URL.

Throws:
ServletException
java.io.IOException

include

public abstract void include(java.lang.String relativeUrl)
                      throws ServletException,
                             java.io.IOException
Includes the a page relative to the current URL.

Throws:
ServletException
java.io.IOException

include

public abstract void include(java.lang.String relativeUrl,
                             boolean flush)
                      throws ServletException,
                             java.io.IOException
Includes the a page relative to the current URL.

Throws:
ServletException
java.io.IOException

initialize

public abstract void initialize(Servlet servlet,
                                ServletRequest request,
                                ServletResponse response,
                                java.lang.String errorPageURL,
                                boolean needsSession,
                                int bufferSize,
                                boolean autoFlush)
                         throws java.io.IOException,
                                java.lang.IllegalStateException,
                                java.lang.IllegalArgumentException
Internal routine to initialize the PageContext for a page.

Throws:
java.io.IOException
java.lang.IllegalStateException
java.lang.IllegalArgumentException

pushBody

public BodyContent pushBody()
Internal routine to support BodyTags. Pushes the new bodyContent to become the value of getOut().


handlePageException

public abstract void handlePageException(java.lang.Exception e)
                                  throws ServletException,
                                         java.io.IOException
Internal routine to support errorPages. Kept for backward compatibility.

Throws:
ServletException
java.io.IOException

handlePageException

public abstract void handlePageException(java.lang.Throwable t)
                                  throws ServletException,
                                         java.io.IOException
Internal routine to support errorPages

Throws:
ServletException
java.io.IOException

release

public abstract void release()
Internal routine to free PageContext resources at the end of a page.


getErrorData

public ErrorData getErrorData()
Returns an error data instance.