|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.jsp.JspContext
javax.servlet.jsp.PageContext
com.caucho.jsp.PageContextImpl
public class PageContextImpl
| Nested Class Summary | |
|---|---|
class |
PageContextImpl.PageELContext
|
class |
PageContextImpl.PageFunctionMapper
|
class |
PageContextImpl.PageVarEnv
Represents the XPath environment for this page. |
class |
PageContextImpl.PageVariableMapper
|
| Field Summary | |
|---|---|
protected boolean |
_isFilled
|
| Fields inherited from class javax.servlet.jsp.PageContext |
|---|
APPLICATION, APPLICATION_SCOPE, CONFIG, EXCEPTION, OUT, PAGE, PAGE_SCOPE, PAGECONTEXT, REQUEST, REQUEST_SCOPE, RESPONSE, SESSION, SESSION_SCOPE |
| Constructor Summary | |
|---|---|
PageContextImpl(WebApp webApp,
java.util.HashMap<java.lang.String,java.lang.reflect.Method> functionMap)
|
|
PageContextImpl(WebApp webApp,
Servlet servlet)
|
|
| Method Summary | |
|---|---|
void |
applicationSetOrRemove(java.lang.String var,
java.lang.Object value)
Set/Remove an webApp attribute. |
protected void |
clearAttributes()
|
ValueExpression |
createExpr(ValueExpression expr,
java.lang.String exprString,
java.lang.Class type)
Creates an expression. |
void |
defaultSetOrRemove(java.lang.String var,
java.lang.Object value)
Set/Remove a page attribute. |
java.lang.StringBuilder |
encode(java.lang.String relativeUrl)
|
java.lang.StringBuilder |
encode(java.lang.StringBuilder sb,
java.lang.String query)
|
protected void |
fillAttribute()
Fills the predefined page content _attributes with their values. |
java.lang.Object |
findAttribute(java.lang.String name)
Finds an attribute in any of the scopes from page to webApp. |
void |
forward(java.lang.String relativeUrl)
Forward a subrequest relative to the current url. |
void |
forward(java.lang.String relativeUrl,
java.lang.String query)
Include another servlet into the current output stream. |
WebApp |
getApplication()
Returns the page's webApp. |
java.lang.Object |
getAttribute(java.lang.String name)
Returns the page attribute with the given name. |
java.lang.Object |
getAttribute(java.lang.String name,
int scope)
Gets an attribute in a given scope. |
java.util.Enumeration<java.lang.String> |
getAttributeNames(int scope)
|
java.util.Enumeration<java.lang.String> |
getAttributeNamesInScope(int scope)
Lists attribute names in a given scope. |
int |
getAttributesScope(java.lang.String name)
Return the scope of the named attribute. |
LocalizationContext |
getBundle(java.lang.String name)
Returns the localized message appropriate for the current context. |
HttpServletRequest |
getCauchoRequest()
Returns the servlet response for the page. |
CauchoResponse |
getCauchoResponse()
Returns the servlet response for the page. |
ELContext |
getELContext()
Returns the expression evaluator |
ErrorData |
getErrorData()
Returns the error data |
java.lang.String |
getErrorPage()
Returns the page's error page. |
java.lang.Exception |
getException()
Returns the exception for error pages. |
ExpressionEvaluator |
getExpressionEvaluator()
Returns the expression evaluator |
java.util.Locale |
getLocale()
Returns the currently active locale. |
static java.util.Locale |
getLocale(java.lang.String value,
java.lang.String variant)
|
java.lang.String |
getLocalizedMessage(java.lang.Object lc,
java.lang.String key,
java.lang.Object[] args,
java.lang.String basename)
Returns the localized message appropriate for the current context. |
java.lang.String |
getLocalizedMessage(java.lang.String key,
java.lang.Object[] args,
java.lang.String basename)
Returns the localized message appropriate for the current context. |
org.w3c.dom.Node |
getNodeEnv()
Returns the XPath node environment corresponding to this page |
JspWriter |
getOut()
Returns the current writer. |
java.lang.Object |
getPage()
Returns the underlying servlet for the page. |
HttpServletRequest |
getRequest()
Returns the servlet request for the page. |
HttpServletResponse |
getResponse()
Returns the servlet response for the page. |
ServletConfig |
getServletConfig()
Returns the servletConfig for the JSP page. |
ServletContext |
getServletContext()
Returns the page's servlet context. |
HttpSession |
getSession()
Returns the request's session. |
HttpSession |
getSessionScope()
Returns the session, throwing an IllegalStateException if it's not available. |
java.lang.Throwable |
getThrowable()
Returns the Throwable stored by the error page. |
java.io.PrintWriter |
getTopWriter()
Returns the top writer. |
VarEnv |
getVarEnv()
Returns the XPath variable environment corresponding to this page |
VariableResolver |
getVariableResolver()
Returns the variable resolver |
void |
handlePageException(java.lang.Exception e)
Handles an exception caught in the JSP page. |
void |
handlePageException(java.lang.Throwable e)
Handles an exception caught in the JSP page. |
void |
include(java.lang.String relativeUrl)
Includes the a page relative to the current URL. |
void |
include(java.lang.String relativeUrl,
boolean flush)
Include another servlet into the current output stream. |
void |
include(java.lang.String relativeUrl,
java.lang.String query,
boolean flush)
Include another servlet into the current output stream. |
protected void |
init()
|
void |
initialize(Servlet servlet,
ServletRequest request,
ServletResponse response,
java.lang.String errorPage,
boolean needsSession,
int bufferSize,
boolean autoFlush)
Internal routine to initialize the PageContext for a page. |
void |
initialize(Servlet servlet,
WebApp app,
ServletRequest request,
ServletResponse response,
java.lang.String errorPage,
HttpSession session,
int bufferSize,
boolean autoFlush,
boolean isPrintNullAsBlank)
|
java.lang.String |
invoke(JspFragment fragment)
Evaluates the fragment, returing the string value. |
java.io.Reader |
invokeReader(JspFragment fragment)
Evaluates the fragment, returing a reader |
java.lang.String |
invokeTrim(JspFragment fragment)
Evaluates the fragment, returing the string value. |
boolean |
isIgnoreException()
Returns true if the EL ignores exceptions |
void |
pageSetOrRemove(java.lang.String var,
java.lang.Object value)
Set/Remove a page attribute. |
JspWriter |
popAndReleaseBody()
Pops the BodyContent from the JspWriter stack. |
JspWriter |
popBody()
Pops the BodyContent from the JspWriter stack. |
static void |
printBody(BodyContentImpl body,
boolean isEscaped)
|
BodyContent |
pushBody()
Pushes a new BodyContent onto the JspWriter stack. |
JspWriter |
pushBody(java.io.Writer writer)
Pushes a new writer onto the JspWriter stack. |
java.lang.Object |
putAttribute(java.lang.String name,
java.lang.Object attribute)
Sets the page attribute with the given name. |
void |
release()
Releases the context. |
void |
releaseBody(BodyContentImpl out)
|
void |
removeAttribute(java.lang.String name)
Removes a named attribute from the page context. |
void |
removeAttribute(java.lang.String name,
int scope)
Removes an attribute in a given scope. |
void |
requestSetOrRemove(java.lang.String var,
java.lang.Object value)
Set/Remove a request attribute. |
java.lang.Object |
resolveVariable(java.lang.String name)
Finds an attribute in any of the scopes from page to webApp. |
void |
sessionSetOrRemove(java.lang.String var,
java.lang.Object value)
Set/Remove a session attribute. |
void |
setAttribute(java.lang.String name,
java.lang.Object attribute)
Sets the page attribute with the given name. |
void |
setAttribute(java.lang.String name,
java.lang.Object value,
int scope)
Sets an attribute in a given scope. |
void |
setErrorPage(java.lang.String errorPage)
Sets the page's error page. |
java.util.Map<java.lang.String,java.lang.Object> |
setMap(java.util.Map<java.lang.String,java.lang.Object> map)
Sets the attribute map. |
void |
setNodeEnv(org.w3c.dom.Node node)
Returns the XPath node environment corresponding to this page |
protected void |
setOut(JspWriter out)
|
JspWriter |
setWriter(JspWriter oldWriter)
Pops the BodyContent from the JspWriter stack. |
static boolean |
toBoolean(java.lang.String value)
Parses a boolean value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean _isFilled
| Constructor Detail |
|---|
public PageContextImpl(WebApp webApp,
Servlet servlet)
public PageContextImpl(WebApp webApp,
java.util.HashMap<java.lang.String,java.lang.reflect.Method> functionMap)
| Method Detail |
|---|
public void initialize(Servlet servlet,
ServletRequest request,
ServletResponse response,
java.lang.String errorPage,
boolean needsSession,
int bufferSize,
boolean autoFlush)
PageContext
initialize in class PageContext
public void initialize(Servlet servlet,
WebApp app,
ServletRequest request,
ServletResponse response,
java.lang.String errorPage,
HttpSession session,
int bufferSize,
boolean autoFlush,
boolean isPrintNullAsBlank)
protected void init()
protected void setOut(JspWriter out)
protected void clearAttributes()
public java.lang.Object getAttribute(java.lang.String name)
getAttribute in class PageContextname - the attribute name.
public void setAttribute(java.lang.String name,
java.lang.Object attribute)
setAttribute in class PageContextname - the attribute name.attribute - the new value
public java.lang.Object putAttribute(java.lang.String name,
java.lang.Object attribute)
name - the attribute name.attribute - the new valuepublic void removeAttribute(java.lang.String name)
removeAttribute in class PageContextname - the name of the attribute to removeprotected void fillAttribute()
public java.lang.Object getAttribute(java.lang.String name,
int scope)
JspContext
getAttribute in class JspContextname - attribute namescope - attribute scope
public void setAttribute(java.lang.String name,
java.lang.Object value,
int scope)
JspContext
setAttribute in class JspContextname - attribute namevalue - attribute valuescope - attribute scope
public void removeAttribute(java.lang.String name,
int scope)
JspContext
removeAttribute in class JspContextpublic java.util.Enumeration<java.lang.String> getAttributeNames(int scope)
public java.util.Enumeration<java.lang.String> getAttributeNamesInScope(int scope)
JspContext
getAttributeNamesInScope in class JspContextpublic java.lang.Object findAttribute(java.lang.String name)
findAttribute in class JspContextname - the attribute name.
public int getAttributesScope(java.lang.String name)
getAttributesScope in class JspContextname - the name of the attribute.
public java.util.Map<java.lang.String,java.lang.Object> setMap(java.util.Map<java.lang.String,java.lang.Object> map)
public JspWriter getOut()
getOut in class PageContextpublic BodyContent pushBody()
pushBody in class PageContextpublic JspWriter pushBody(java.io.Writer writer)
pushBody in class JspContextpublic JspWriter popBody()
popBody in class JspContext
public JspWriter popAndReleaseBody()
throws java.io.IOException
java.io.IOException
public void releaseBody(BodyContentImpl out)
throws java.io.IOException
java.io.IOExceptionpublic JspWriter setWriter(JspWriter oldWriter)
oldWriter - the old writer
public java.io.PrintWriter getTopWriter()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object getPage()
getPage in class PageContextpublic HttpServletRequest getRequest()
getRequest in class PageContextpublic HttpServletResponse getResponse()
getResponse in class PageContextpublic CauchoResponse getCauchoResponse()
public HttpServletRequest getCauchoRequest()
public HttpSession getSession()
PageContext
getSession in class PageContextpublic HttpSession getSessionScope()
public ServletConfig getServletConfig()
PageContext
getServletConfig in class PageContextpublic ServletContext getServletContext()
getServletContext in class PageContextpublic WebApp getApplication()
public java.lang.String getErrorPage()
public void setErrorPage(java.lang.String errorPage)
public java.lang.Exception getException()
PageContext
getException in class PageContextpublic java.lang.Throwable getThrowable()
public void include(java.lang.String relativeUrl)
throws ServletException,
java.io.IOException
PageContext
include in class PageContextServletException
java.io.IOException
public void include(java.lang.String relativeUrl,
java.lang.String query,
boolean flush)
throws ServletException,
java.io.IOException
relativeUrl - url relative to the current request.
ServletException
java.io.IOExceptionpublic java.lang.StringBuilder encode(java.lang.String relativeUrl)
public java.lang.StringBuilder encode(java.lang.StringBuilder sb,
java.lang.String query)
public void include(java.lang.String relativeUrl,
boolean flush)
throws ServletException,
java.io.IOException
include in class PageContextrelativeUrl - url relative to the current request.
ServletException
java.io.IOException
public void forward(java.lang.String relativeUrl,
java.lang.String query)
throws ServletException,
java.io.IOException
relativeUrl - url relative to the current request.
ServletException
java.io.IOException
public void forward(java.lang.String relativeUrl)
throws ServletException,
java.io.IOException
forward in class PageContextrelativeUrl - url relative to the current file
ServletException
java.io.IOException
public void handlePageException(java.lang.Exception e)
throws ServletException,
java.io.IOException
handlePageException in class PageContexte - the caught exception
ServletException
java.io.IOException
public void handlePageException(java.lang.Throwable e)
throws ServletException,
java.io.IOException
handlePageException in class PageContexte - the caught exception
ServletException
java.io.IOExceptionpublic ErrorData getErrorData()
getErrorData in class PageContextpublic VariableResolver getVariableResolver()
getVariableResolver in class JspContextpublic ExpressionEvaluator getExpressionEvaluator()
getExpressionEvaluator in class JspContextpublic ELContext getELContext()
getELContext in class JspContextpublic void release()
release in class PageContext
public java.lang.String getLocalizedMessage(java.lang.String key,
java.lang.Object[] args,
java.lang.String basename)
getLocalizedMessage in interface JstlPageContext
public java.lang.String getLocalizedMessage(java.lang.Object lc,
java.lang.String key,
java.lang.Object[] args,
java.lang.String basename)
getLocalizedMessage in interface JstlPageContextpublic LocalizationContext getBundle(java.lang.String name)
public java.util.Locale getLocale()
public static java.util.Locale getLocale(java.lang.String value,
java.lang.String variant)
public static void printBody(BodyContentImpl body,
boolean isEscaped)
throws java.io.IOException
java.io.IOException
public java.lang.String invoke(JspFragment fragment)
throws JspException,
java.io.IOException
JspException
java.io.IOException
public java.lang.String invokeTrim(JspFragment fragment)
throws JspException,
java.io.IOException
JspException
java.io.IOException
public java.io.Reader invokeReader(JspFragment fragment)
throws JspException,
java.io.IOException
JspException
java.io.IOExceptionpublic static boolean toBoolean(java.lang.String value)
public void defaultSetOrRemove(java.lang.String var,
java.lang.Object value)
public void pageSetOrRemove(java.lang.String var,
java.lang.Object value)
public void requestSetOrRemove(java.lang.String var,
java.lang.Object value)
public void sessionSetOrRemove(java.lang.String var,
java.lang.Object value)
public void applicationSetOrRemove(java.lang.String var,
java.lang.Object value)
public boolean isIgnoreException()
isIgnoreException in interface ExprEnvpublic VarEnv getVarEnv()
public org.w3c.dom.Node getNodeEnv()
public void setNodeEnv(org.w3c.dom.Node node)
public ValueExpression createExpr(ValueExpression expr,
java.lang.String exprString,
java.lang.Class type)
public java.lang.Object resolveVariable(java.lang.String name)
throws ELException
resolveVariable in interface VariableResolvername - the attribute name.
ELException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||