BodyTag Interface |
Interface name:
javax.servlet.jsp.tagext.BodyTag
Extends:
javax.servlet.jsp.tagext.Tag
Implemented by:
Custom action tag handler classes and javax.servlet.jsp.tagext.BodyTagSupport
Description
The BodyTag interface must be implemented by tag handler classes that need access to the body contents of the corresponding custom action element; for instance, in order to perform a transformation of the contents before they are included in the response. This interface must also be implemented by tag handlers that need to iterate over the body of a custom action element.

doAfterBody() |
public int doAfterBody() throws JspException
Performs actions after the body has been evaluated. This method is invoked after every body evaluation. If this method returns EVAL_BODY_TAG the body is evaluated again, typically after changing the values of variables used in it. If it returns SKIP_BODY, the processing continues with a call to doEndTag(). This method is not invoked if the element body is empty or if doStartTag() returns SKIP_BODY.

doInitBody() |
public void doInitBody() throws JspException
Prepares for evaluation of the body. This method is invoked by the page implementation once per action invocation, after a new BodyContent has been obtained and set on the tag handler via the setBodyContent() method and before the evaluation of the element's body. This method is not invoked if the element body is empty or if doStartTag() returns SKIP_BODY.

setBodyContent() |
public void setBodyContent(BodyContent b)
Sets the BodyContent created for this tag handler. This method is not invoked if the element body is empty or if doStartTag() returns SKIP_BODY.