Name
BodyTag
Synopsis
The BodyTag
interface
extends the IterationTag interface. It must be
implemented by tag handler classes that need access to the body
contents of the corresponding custom action element, for instance in
order to perform a transformation of the contents before
it’s included in the response. A tag handler that
implements this interface must return
EVAL_BODY_BUFFERED from doStartTag( ) to tell the container to capture the result of evaluating
the body. It also can return EVAL_BODY_AGAIN from
doAfterBody( ) to tell the container to evaluate
the body again and capture the result.
Synopsis
|
Interface name: |
|
|
Extends: |
|
|
Implemented by: |
Custom action tag handler classes and
|
Fields
public static final int EVAL_BODY_BUFFERED
Methods
-
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
BodyContenthas been obtained and set on the tag handler via thesetBodyContent( )method and before the evaluation of the element’s body.This method isn’t invoked if the element body is empty or if
doStartTag( )returnsSKIP_BODY.-
public void setBodyContent(BodyContent b) Sets the
BodyContentcreated for this tag handler. This method isn’t invoked if the element body is empty or ifdoStartTag( )returnsSKIP_BODY.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access