Class RequestContextAwareTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.springframework.web.servlet.tags.RequestContextAwareTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, jakarta.servlet.jsp.tagext.TryCatchFinally, Serializable
- Direct Known Subclasses:
HtmlEscapeTag, HtmlEscapingAwareTag
public abstract class RequestContextAwareTag
extends jakarta.servlet.jsp.tagext.TagSupport
implements jakarta.servlet.jsp.tagext.TryCatchFinally
Superclass for all tags that require a
RequestContext.
The RequestContext instance provides easy access
to current state like the
webApplicationContext,
the Locale, etc.
Mainly intended for
DispatcherServlet requests;
will use fallbacks when used outside DispatcherServlet.
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.commons.logging.LogLogger available to subclasses.static final StringPageContextattribute for the page-levelRequestContextinstance.Fields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidfinal intCreate and expose the current RequestContext.protected abstract intCalled by doStartTag to perform the actual work.protected final RequestContextReturn the current RequestContext.Methods inherited from class jakarta.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
-
Field Details
-
REQUEST_CONTEXT_PAGE_ATTRIBUTE
PageContextattribute for the page-levelRequestContextinstance.- See Also:
-
logger
protected final org.apache.commons.logging.Log loggerLogger available to subclasses.
-
-
Constructor Details
-
RequestContextAwareTag
public RequestContextAwareTag()
-
-
Method Details
-
doStartTag
public final int doStartTag() throws jakarta.servlet.jsp.JspExceptionCreate and expose the current RequestContext. Delegates todoStartTagInternal()for actual work.- Specified by:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjakarta.servlet.jsp.tagext.TagSupport- Throws:
jakarta.servlet.jsp.JspException- See Also:
-
getRequestContext
Return the current RequestContext. -
doStartTagInternal
-
doCatch
-
doFinally
public void doFinally()- Specified by:
doFinallyin interfacejakarta.servlet.jsp.tagext.TryCatchFinally
-