javax.servlet.jsp.tagext
类 BodyTagSupport

java.lang.Object
  继承者 javax.servlet.jsp.tagext.TagSupport
      继承者 javax.servlet.jsp.tagext.BodyTagSupport
所有已实现的接口:
Serializable, BodyTag, IterationTag, JspTag, Tag

public class BodyTagSupport
extends TagSupport
implements BodyTag

A base class for defining tag handlers implementing BodyTag.

The BodyTagSupport class implements the BodyTag interface and adds additional convenience methods including getter methods for the bodyContent property and methods to get at the previous out JspWriter.

Many tag handlers will extend BodyTagSupport and only redefine a few methods.

另请参见:
序列化表格

字段摘要
protected  BodyContent bodyContent
          The current BodyContent for this BodyTag.
 
从类 javax.servlet.jsp.tagext.TagSupport 继承的字段
id, pageContext
 
从接口 javax.servlet.jsp.tagext.BodyTag 继承的字段
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
从接口 javax.servlet.jsp.tagext.IterationTag 继承的字段
EVAL_BODY_AGAIN
 
从接口 javax.servlet.jsp.tagext.Tag 继承的字段
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
构造方法摘要
BodyTagSupport()
          Default constructor, all subclasses are required to only define a public constructor with the same signature, and to call the superclass constructor.
 
方法摘要
 int doAfterBody()
          After the body evaluation: do not reevaluate and continue with the page.
 int doEndTag()
          Default processing of the end tag returning EVAL_PAGE.
 void doInitBody()
          Prepare for evaluation of the body just before the first body evaluation: no action.
 int doStartTag()
          Default processing of the start tag returning EVAL_BODY_BUFFERED.
 BodyContent getBodyContent()
          Get current bodyContent.
 JspWriter getPreviousOut()
          Get surrounding out JspWriter.
 void release()
          Release state.
 void setBodyContent(BodyContent b)
          Prepare for evaluation of the body: stash the bodyContent away.
 
从类 javax.servlet.jsp.tagext.TagSupport 继承的方法
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
从接口 javax.servlet.jsp.tagext.Tag 继承的方法
getParent, setPageContext, setParent
 

字段详细信息

bodyContent

protected BodyContent bodyContent
The current BodyContent for this BodyTag.

构造方法详细信息

BodyTagSupport

public BodyTagSupport()
Default constructor, all subclasses are required to only define a public constructor with the same signature, and to call the superclass constructor. This constructor is called by the code generated by the JSP translator.

方法详细信息

doStartTag

public int doStartTag()
               throws JspException
Default processing of the start tag returning EVAL_BODY_BUFFERED.

指定者:
接口 Tag 中的 doStartTag
覆盖:
TagSupport 中的 doStartTag
返回:
EVAL_BODY_BUFFERED
抛出:
JspException - if an error occurred while processing this tag
另请参见:
Tag.doStartTag()

doEndTag

public int doEndTag()
             throws JspException
Default processing of the end tag returning EVAL_PAGE.

指定者:
接口 Tag 中的 doEndTag
覆盖:
TagSupport 中的 doEndTag
返回:
EVAL_PAGE
抛出:
JspException - if an error occurred while processing this tag
另请参见:
Tag.doEndTag()

setBodyContent

public void setBodyContent(BodyContent b)
Prepare for evaluation of the body: stash the bodyContent away.

指定者:
接口 BodyTag 中的 setBodyContent
参数:
b - the BodyContent
另请参见:
doAfterBody(), doInitBody(), BodyTag.setBodyContent(javax.servlet.jsp.tagext.BodyContent)

doInitBody

public void doInitBody()
                throws JspException
Prepare for evaluation of the body just before the first body evaluation: no action.

指定者:
接口 BodyTag 中的 doInitBody
抛出:
JspException - if an error occurred while processing this tag
另请参见:
setBodyContent(javax.servlet.jsp.tagext.BodyContent), doAfterBody(), BodyTag.doInitBody()

doAfterBody

public int doAfterBody()
                throws JspException
After the body evaluation: do not reevaluate and continue with the page. By default nothing is done with the bodyContent data (if any).

指定者:
接口 IterationTag 中的 doAfterBody
覆盖:
TagSupport 中的 doAfterBody
返回:
SKIP_BODY
抛出:
JspException - if an error occurred while processing this tag
另请参见:
doInitBody(), IterationTag.doAfterBody()

release

public void release()
Release state.

指定者:
接口 Tag 中的 release
覆盖:
TagSupport 中的 release
另请参见:
Tag.release()

getBodyContent

public BodyContent getBodyContent()
Get current bodyContent.

返回:
the body content.

getPreviousOut

public JspWriter getPreviousOut()
Get surrounding out JspWriter.

返回:
the enclosing JspWriter, from the bodyContent.


Copyright © 2013. All Rights Reserved.