Implementation of the PageContext class from the JSP spec.
Also doubles as a VariableResolver for the EL.
findAttribute
public Object findAttribute(String name)
forward
public void forward(String relativeUrlPath)
throws ServletException,
IOException
getAttribute
public Object getAttribute(String name)
getAttribute
public Object getAttribute(String name,
int scope)
getAttributeNamesInScope
public Enumeration getAttributeNamesInScope(int scope)
getAttributesScope
public int getAttributesScope(String name)
getException
public Exception getException()
Returns the exception associated with this page
context, if any.
Added wrapping for Throwables to avoid ClassCaseException:
see Bugzilla 31171 for details.
- The Exception associated with this page context, if any.
getExpressionEvaluator
public ExpressionEvaluator getExpressionEvaluator()
Provides programmatic access to the ExpressionEvaluator.
The JSP Container must return a valid instance of an
ExpressionEvaluator that can parse EL expressions.
getOut
public JspWriter getOut()
getPage
public Object getPage()
getRequest
public ServletRequest getRequest()
getResponse
public ServletResponse getResponse()
getServlet
public Servlet getServlet()
getServletConfig
public ServletConfig getServletConfig()
getServletContext
public ServletContext getServletContext()
getSession
public HttpSession getSession()
getVariableResolver
public VariableResolver getVariableResolver()
handlePageException
public void handlePageException(Exception ex)
throws IOException,
ServletException
handlePageException
public void handlePageException(Throwable t)
throws IOException,
ServletException
include
public void include(String relativeUrlPath)
throws ServletException,
IOException
include
public void include(String relativeUrlPath,
boolean flush)
throws ServletException,
IOException
initialize
public void initialize(Servlet servlet,
ServletRequest request,
ServletResponse response,
String errorPageURL,
boolean needsSession,
int bufferSize,
boolean autoFlush)
throws IOException
popBody
public JspWriter popBody()
proprietaryEvaluate
public static Object proprietaryEvaluate(String expression,
Class expectedType,
PageContext pageContext,
ProtectedFunctionMapper functionMap,
boolean escape)
throws ELException
Proprietary method to evaluate EL expressions.
XXX - This method should go away once the EL interpreter moves
out of JSTL and into its own project. For now, this is necessary
because the standard machinery is too slow.
expression
- The expression to be evaluatedexpectedType
- The expected resulting typepageContext
- The page contextfunctionMap
- Maps prefix and name to Method
- The result of the evaluation
pushBody
public BodyContent pushBody()
pushBody
public JspWriter pushBody(Writer writer)
release
public void release()
removeAttribute
public void removeAttribute(String name)
removeAttribute
public void removeAttribute(String name,
int scope)
resolveVariable
public Object resolveVariable(String pName)
throws ELException
VariableResolver interface
setAttribute
public void setAttribute(String name,
Object attribute)
setAttribute
public void setAttribute(String name,
Object o,
int scope)