public abstract class RequestContextAwareTag extends TagSupport implements TryCatchFinally
RequestContext.
The RequestContext instance provides easy access
to current state like the
WebApplicationContext,
the Locale, the
Theme, etc.
Mainly intended for
DispatcherServlet requests;
will use fallbacks when used outside DispatcherServlet.
RequestContext,
DispatcherServlet,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected Log |
logger
Logger available to subclasses
|
static String |
REQUEST_CONTEXT_PAGE_ATTRIBUTE
PageContext attribute for the
page-level RequestContext instance. |
id, pageContextEVAL_BODY_AGAINEVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE| Constructor and Description |
|---|
RequestContextAwareTag() |
| Modifier and Type | Method and Description |
|---|---|
void |
doCatch(Throwable throwable) |
void |
doFinally() |
int |
doStartTag()
Create and expose the current RequestContext.
|
protected abstract int |
doStartTagInternal()
Called by doStartTag to perform the actual work.
|
protected RequestContext |
getRequestContext()
Return the current RequestContext.
|
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValuepublic static final String REQUEST_CONTEXT_PAGE_ATTRIBUTE
PageContext attribute for the
page-level RequestContext instance.protected final Log logger
public final int doStartTag()
throws JspException
doStartTagInternal() for actual work.doStartTag in interface TagdoStartTag in class TagSupportJspExceptionREQUEST_CONTEXT_PAGE_ATTRIBUTE,
JspAwareRequestContextprotected final RequestContext getRequestContext()
protected abstract int doStartTagInternal()
throws Exception
Exception - any exception, any checked one other than
a JspException gets wrapped in a JspException by doStartTagTagSupport.doStartTag()public void doCatch(Throwable throwable) throws Throwable
doCatch in interface TryCatchFinallyThrowablepublic void doFinally()
doFinally in interface TryCatchFinally