类 RequestContextAwareTag
- java.lang.Object
- javax.servlet.jsp.tagext.TagSupport
- org.springframework.web.servlet.tags.RequestContextAwareTag
- 所有已实现的接口:
Serializable
,IterationTag
,JspTag
,Tag
,TryCatchFinally
- 直接已知子类:
HtmlEscapeTag
,HtmlEscapingAwareTag
public abstract class RequestContextAwareTag extends TagSupport implements TryCatchFinally
Superclass for all tags that require aRequestContext
.The
RequestContext
instance provides easy access to current state like theWebApplicationContext
, theLocale
, theTheme
, etc.Mainly intended for
DispatcherServlet
requests; will use fallbacks when used outsideDispatcherServlet
.- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
RequestContext
,DispatcherServlet
, 序列化表格
字段概要
字段 修饰符和类型 字段 说明 protected Log
logger
Logger available to subclasses.static String
REQUEST_CONTEXT_PAGE_ATTRIBUTE
PageContext
attribute for the page-levelRequestContext
instance.从类继承的字段 javax.servlet.jsp.tagext.TagSupport
id, pageContext
从接口继承的字段 javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
从接口继承的字段 javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
构造器概要
构造器 构造器 说明 RequestContextAwareTag()
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 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.从类继承的方法 javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
字段详细资料
REQUEST_CONTEXT_PAGE_ATTRIBUTE
public static final String REQUEST_CONTEXT_PAGE_ATTRIBUTE
PageContext
attribute for the page-levelRequestContext
instance.- 另请参阅:
- 常量字段值
构造器详细资料
RequestContextAwareTag
public RequestContextAwareTag()
方法详细资料
doStartTag
public final int doStartTag() throws JspException
Create and expose the current RequestContext. Delegates todoStartTagInternal()
for actual work.- 指定者:
doStartTag
在接口中Tag
- 覆盖:
doStartTag
在类中TagSupport
- 抛出:
JspException
- 另请参阅:
REQUEST_CONTEXT_PAGE_ATTRIBUTE
,JspAwareRequestContext
getRequestContext
protected final RequestContext getRequestContext()
Return the current RequestContext.
doStartTagInternal
protected abstract int doStartTagInternal() throws Exception
Called by doStartTag to perform the actual work.- 返回:
- same as TagSupport.doStartTag
- 抛出:
Exception
- any exception, any checked one other than a JspException gets wrapped in a JspException by doStartTag- 另请参阅:
TagSupport.doStartTag()
doCatch
public void doCatch(Throwable throwable) throws Throwable
- 指定者:
doCatch
在接口中TryCatchFinally
- 抛出:
Throwable
doFinally
public void doFinally()
- 指定者:
doFinally
在接口中TryCatchFinally