public class BodyTagSupport extends TagSupport implements BodyTag
The default behavior executes the body once, ignoring the contents.
Modifier and Type | Field and Description |
---|---|
protected BodyContent |
bodyContent |
id, pageContext
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
EVAL_BODY_AGAIN
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor and Description |
---|
BodyTagSupport()
Implementing tags must implement a zero-arg constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
doAfterBody()
Action after the body completes, returning EVAL_BODY_TAG to loop and
SKIP_BODY to stop looping.
|
void |
doInitBody()
The default init action is to do nothing.
|
int |
doStartTag()
The default start action is EVAL_BODY_TAG, i.e.
|
BodyContent |
getBodyContent()
Returns the tag's body content.
|
JspWriter |
getPreviousOut()
Returns the enclosing writer.
|
void |
release()
Release the tag.
|
void |
setBodyContent(BodyContent bodyContent)
Called by the JSP engine just before calling doInitBody().
|
doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doEndTag, getParent, setPageContext, setParent
protected BodyContent bodyContent
public BodyTagSupport()
public void setBodyContent(BodyContent bodyContent)
setBodyContent
in interface BodyTag
bodyContent
- a bodyContent generated by the JSP engine.public BodyContent getBodyContent()
public JspWriter getPreviousOut()
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class TagSupport
JspException
public void doInitBody() throws JspException
doInitBody
in interface BodyTag
JspException
public int doAfterBody() throws JspException
The default action is to only execute the body once.
doAfterBody
in interface BodyTag
doAfterBody
in interface IterationTag
doAfterBody
in class TagSupport
JspException
public void release()
release
in interface Tag
release
in class TagSupport