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
BodyContent
has 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
BodyContent
created for this tag handler. This method isn’t invoked if the element body is empty or ifdoStartTag( )
returnsSKIP_BODY
.
Get JavaServer Pages, Second Edition 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.