Java javax.servlet.jsp PageContext fields, constructors, methods, implement or subclass

Example usage for Java javax.servlet.jsp PageContext fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.servlet.jsp PageContext.

The text is from its open source code.

Subclass

javax.servlet.jsp.PageContext has subclasses.
Click this link to see all its subclasses.

Field

intPAGE_SCOPE
Page scope: (this is the default) the named reference remains available in this PageContext until the return from the current Servlet.service() invocation.
intREQUEST_SCOPE
Request scope: the named reference remains available from the ServletRequest associated with the Servlet until the current request is completed.
intSESSION_SCOPE
Session scope (only valid if this page participates in a session): the named reference remains available from the HttpSession (if any) associated with the Servlet until the HttpSession is invalidated.
intAPPLICATION_SCOPE
Application scope: named reference remains available in the ServletContext until it is reclaimed.
StringEXCEPTION
Name used to store uncaught exception in ServletRequest attribute list and PageContext name table.

Method

ObjectfindAttribute(String name)
Searches for the named attribute in page, request, session (if valid), and application scope(s) in order and returns the value associated or null.
ObjectgetAttribute(String name)
Returns the object associated with the name in the page scope or null if not found.
ObjectgetAttribute(String name, int scope)
Return the object associated with the name in the specified scope or null if not found.
EnumerationgetAttributeNamesInScope(int scope)
Enumerate all the attributes in a given scope.
ClassgetClass()
Returns the runtime class of this Object .
ELContextgetELContext()
Returns the ELContext associated with this JspContext.
ExpressionEvaluatorgetExpressionEvaluator()
Provides programmatic access to the ExpressionEvaluator.
JspWritergetOut()
The current value of the out object (a JspWriter).
ServletRequestgetRequest()
The current value of the request object (a ServletRequest).
ServletResponsegetResponse()
The current value of the response object (a ServletResponse).
ServletConfiggetServletConfig()
The ServletConfig instance.
ServletContextgetServletContext()
The ServletContext instance.
HttpSessiongetSession()
The current value of the session object (an HttpSession).
VariableResolvergetVariableResolver()
Returns an instance of a VariableResolver that provides access to the implicit objects specified in the JSP specification using this JspContext as the context object.
voidhandlePageException(Exception e)

This method is intended to process an unhandled 'page' level exception by forwarding the exception to the specified error page for this JSP.

voidhandlePageException(Throwable t)

This method is intended to process an unhandled 'page' level exception by forwarding the exception to the specified error page for this JSP.

voidinclude(String relativeUrlPath, boolean flush)

Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread.

voidinclude(String relativeUrlPath)

Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread.

voidinitialize(Servlet servlet, ServletRequest request, ServletResponse response, String errorPageURL, boolean needsSession, int bufferSize, boolean autoFlush)

The initialize method is called to initialize an uninitialized PageContext so that it may be used by a JSP Implementation class to service an incoming request and response within it's _jspService() method.

JspWriterpopBody()
Return the previous JspWriter "out" saved by the matching pushBody(), and update the value of the "out" attribute in the page scope attribute namespace of the JspContext.
BodyContentpushBody()
Return a new BodyContent object, save the current "out" JspWriter, and update the value of the "out" attribute in the page scope attribute namespace of the PageContext.
voidrelease()

This method shall "reset" the internal state of a PageContext, releasing all internal references, and preparing the PageContext for potential reuse by a later invocation of initialize().

voidremoveAttribute(String name)
Remove the object reference associated with the given name from all scopes.
voidremoveAttribute(String name, int scope)
Remove the object reference associated with the specified name in the given scope.
voidsetAttribute(String name, Object value, int scope)
Register the name and value specified with appropriate scope semantics.
voidsetAttribute(String name, Object value)
Register the name and value specified with page scope semantics.