FileDocCategorySizeDatePackage
BodyTagSupport.javaAPI DocApache Tomcat 6.0.144207Fri Jul 20 04:20:32 BST 2007javax.servlet.jsp.tagext

BodyTagSupport

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.

Fields Summary
protected BodyContent
bodyContent
The current BodyContent for this BodyTag.
Constructors Summary
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.

	super();
    
Methods Summary
public intdoAfterBody()
After the body evaluation: do not reevaluate and continue with the page. By default nothing is done with the bodyContent data (if any).

return
SKIP_BODY
throws
JspException if an error occurred while processing this tag
see
#doInitBody
see
BodyTag#doAfterBody

 	return SKIP_BODY;
    
public intdoEndTag()
Default processing of the end tag returning EVAL_PAGE.

return
EVAL_PAGE
throws
JspException if an error occurred while processing this tag
see
Tag#doEndTag

	return super.doEndTag();
    
public voiddoInitBody()
Prepare for evaluation of the body just before the first body evaluation: no action.

throws
JspException if an error occurred while processing this tag
see
#setBodyContent
see
#doAfterBody
see
BodyTag#doInitBody

    
public intdoStartTag()
Default processing of the start tag returning EVAL_BODY_BUFFERED.

return
EVAL_BODY_BUFFERED
throws
JspException if an error occurred while processing this tag
see
BodyTag#doStartTag

        return EVAL_BODY_BUFFERED;
    
public BodyContentgetBodyContent()
Get current bodyContent.

return
the body content.

	return bodyContent;
    
public javax.servlet.jsp.JspWritergetPreviousOut()
Get surrounding out JspWriter.

return
the enclosing JspWriter, from the bodyContent.

	return bodyContent.getEnclosingWriter();
    
public voidrelease()
Release state.

see
Tag#release

	bodyContent = null;

	super.release();
    
public voidsetBodyContent(BodyContent b)
Prepare for evaluation of the body: stash the bodyContent away.

param
b the BodyContent
see
#doAfterBody
see
#doInitBody()
see
BodyTag#setBodyContent

	this.bodyContent = b;