Name
BodyTag
Synopsis
Interface Name: |
javax.servlet.jsp.tagext.BodyTag |
Extends: |
javax.servlet.jsp.tagext.Tag |
Implemented by: |
Custom action tag handler classes and
|
Description
The BodyTag
interface must be implemented by tag
handler classes that need access to the body contents of the
corresponding custom action element, perhaps to perform a
transformation of the contents before it’s 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.
Interface Declarations
public interface BodyTag extends Tag { // Constants public static final int EVAL_BODY_TAG; // Methods public int doAfterBody( ) throws JspException; public void doInitBody( ) throws JspException; public void setBodyContent(BodyContent b); }
Methods
-
public int doAfterBody( ) throws JspException
Performs actions after the body has been evaluated. It is invoked after every body evaluation. If this method returns
EVAL_BODY_TAG
, the body is evaluated again, typically after changing the value of variables used in the body. If it returnsSKIP_BODY
, the processing continues with a call todoEndTag( )
.If the element body is empty, or if
doStartTag( )
returnsSKIP_BODY
, this method is not invoked.-
public void doInitBody( ) throws JspException
Prepares for evaluation of the body. This method is invoked once per action invocation by the page implementation, after a new
BodyContent
has been obtained and set ...
Get Java Server Pages now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.