Java Reference
In-Depth Information
The interface provides one field and three new methods. The first is to be invoked with the
BodyContent for the evaluation of the body; the second is to be reevaluated after every body
public static final int EVAL_BODY_TAG
This field requests the creation of new BodyContent on which to evaluate the body of this tag.
It is returned from doStartTag and doAfterBody . This is an illegal return value for
doStartTag when the class does not implement BodyTag , because BodyTag is needed to manip-
ulate the new Writer .
The setBodyContent() Method
public void setBodyContent(BodyContent b)
This method is used by the JSP engine to set the body content of the tag. It returns no value
and throws no exceptions.
It takes one parameter:
The doInitBody() Method
public void doInitBody() throws JspException
The method will be invoked once per action invocation by the page implementation. It's
invoked after a new BodyContent has been obtained and set on the tag handler through the
setBodyContent() method and before the evaluation of the tag's body into that BodyContent .
It has no parameters and returns no value.
It throws this exception:
The doAfterBody() Method
public int doAfterBody() throws JspException
The doAfterBody() method is executed after some body has been evaluated. It is not invoked
in empty tags or in tags returning SKIP_BODY in doStartTag() . It has no parameters and
returns no value.
It throws this exception:
Search WWH ::

Custom Search