Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.servlet.jsp
Class PageContext

    java.lang.Object
      |
      +--javax.servlet.jsp.PageContext

Direct Known Subclasses:
  QPageContext

public abstract class PageContext
extends java.lang.Object

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 java.lang.Object` | `findAttribute(java.lang.String name)` Finds an attribute in all scopes.
`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.
`abstract java.lang.Object` | `getAttribute(java.lang.String name, int scope)` Gets an attribute in a given scope.
`abstract java.util.Enumeration` | `getAttributeNames()` Return an enumeration of all the attribute names.
`abstract java.util.Enumeration` | `getAttributeNamesInScope(int scope)` Lists attribute names in a given scope.
`abstract int` | `getAttributesScope(java.lang.String name)` Returns the scope for an attribute.
`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` | `include(java.lang.String relativeUrl)` 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.
`JspWriter` | `popBody()` Internal routine to support BodyTags.
`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` | `removeAttribute(java.lang.String name, int scope)` Removes an attribute in a given scope.
`abstract void` | `setAttribute(java.lang.String name, java.lang.Object attribute)` Sets the named page attribute.
`abstract void` | `setAttribute(java.lang.String name, java.lang.Object o, int scope)` Sets an attribute in a given scope.

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

### REQUEST_SCOPE

    public static final int REQUEST_SCOPE

### SESSION_SCOPE

    public static final int SESSION_SCOPE

### APPLICATION_SCOPE

    public static final int APPLICATION_SCOPE

### PAGE

    public static final java.lang.String PAGE

### PAGECONTEXT

    public static final java.lang.String PAGECONTEXT

### REQUEST

    public static final java.lang.String REQUEST

### RESPONSE

    public static final java.lang.String RESPONSE

### CONFIG

    public static final java.lang.String CONFIG

### SESSION

    public static final java.lang.String SESSION

### OUT

    public static final java.lang.String OUT

### APPLICATION

    public static final java.lang.String APPLICATION

### EXCEPTION

    public static final java.lang.String EXCEPTION

Constructor Detail

### PageContext

    public PageContext()

Method Detail

### getAttribute

    public abstract java.lang.Object getAttribute(java.lang.String name)

  Gets the named page attribute.
  Parameters:
    `name` - of the attribute

### setAttribute

    public abstract void setAttribute(java.lang.String name,
                                      java.lang.Object attribute)

  Sets the named page attribute.
  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.

### getAttributeNames

    public abstract java.util.Enumeration getAttributeNames()

  Return an enumeration of all the attribute names.

### getOut

    public abstract JspWriter getOut()

  Returns the current output for the page.

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

### include

    public abstract void include(java.lang.String relativeUrl)
                          throws ServletException,
                                 java.io.IOException

  Includes the a page relative to the current URL.

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

### setAttribute

    public abstract void setAttribute(java.lang.String name,
                                      java.lang.Object o,
                                      int scope)

  Sets an attribute in a given scope. You should use the scope-specific routines instead, like request.setAttribute.
  Parameters:
    `name` - attribute name
    `o` - attribute value
    `scope` - attribute scope

### getAttribute

    public abstract java.lang.Object getAttribute(java.lang.String name,
                                                  int scope)

  Gets an attribute in a given scope. You should use the scope-specific routines instead, like request.getAttribute.
  Parameters:
    `name` - attribute name
    `scope` - attribute scope

### removeAttribute

    public abstract void removeAttribute(java.lang.String name,
                                         int scope)

  Removes an attribute in a given scope. You should use the scope-specific routines instead, like request.removeAttribute.

### getAttributeNamesInScope

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

  Lists attribute names in a given scope. You should use the scope-specific routines instead, like request.getAttributeNames

### getAttributesScope

    public abstract int getAttributesScope(java.lang.String name)

  Returns the scope for an attribute.

### findAttribute

    public abstract java.lang.Object findAttribute(java.lang.String name)

  Finds an attribute in all scopes.

### pushBody

    public BodyContent pushBody()

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

### popBody

    public JspWriter popBody()

  Internal routine to support BodyTags.

### handlePageException

    public abstract void handlePageException(java.lang.Exception e)
                                      throws ServletException,
                                             java.io.IOException

  Internal routine to support errorPages

### release

    public abstract void release()

  Internal routine to free PageContext resources at the end of a page.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD