javax.servlet.jsp.tagext
public class: BodyTagSupport [javadoc |
source]
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
All Implemented Interfaces:
BodyTag, IterationTag, Serializable
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.
Field Summary |
---|
protected BodyContent | bodyContent | The current BodyContent for this BodyTag. |
Constructor: |
public BodyTagSupport() {
super();
}
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. |
Methods from javax.servlet.jsp.tagext.TagSupport: |
---|
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from javax.servlet.jsp.tagext.BodyTagSupport Detail: |
public int doAfterBody() throws JspException {
return SKIP_BODY;
}
After the body evaluation: do not reevaluate and continue with the page.
By default nothing is done with the bodyContent data (if any). |
public int doEndTag() throws JspException {
return super.doEndTag();
}
Default processing of the end tag returning EVAL_PAGE. |
public void doInitBody() throws JspException {
}
Prepare for evaluation of the body just before the first body evaluation:
no action. |
public int doStartTag() throws JspException {
return EVAL_BODY_BUFFERED;
}
Default processing of the start tag returning EVAL_BODY_BUFFERED. |
public BodyContent getBodyContent() {
return bodyContent;
}
|
public JspWriter getPreviousOut() {
return bodyContent.getEnclosingWriter();
}
Get surrounding out JspWriter. |
public void release() {
bodyContent = null;
super.release();
}
|
public void setBodyContent(BodyContent b) {
this.bodyContent = b;
}
Prepare for evaluation of the body: stash the bodyContent away. |