doAfterBody
).  If 
doAfterBody
 returns SKIP_BODY no more body 
evaluations will occur, the value of out will be restored using the 
popBody
 method in 
pageContext
, and then 
doEndTag
 will be invoked.
The method re invocations may be lead to different actions because there might have 
been some changes to shared state, or because of external computation..
Depending on TagExtraInfo values, the JSP container will resynchronize some variable 
values after every 
doAfterBody
 invocation (so a reevaluation of the body will 
return a different value).
This method may throw a JspException.
5.4.5
The BodyContent Class
The 
BodyContent
 is a subclass of 
JspWriter
 that can be used to process body 
evaluations so they can retrieved later on. The class has methods to convert its contents into 
a String, to read its contents, and to clear the contents.
The buffer size of a BodyContent object is  unbounded .  A BodyContent object cannot be 
in autoFlush mode.  It is not possible to invoke 
flush
 on a BodyContent object, as there is 
no 
backing
 stream.  This means that it is not legal to do a 
jsp:include
 when out is not 
bound to the top level 
JspWriter
.
Instances of this class are created by invoking the 
pushBody
 and 
popBody
 methods of the 
PageContext
 class.  A 
BodyContent
 is enclosed within another 
JspWriter
 (maybe 
another 
BodyContent
 object) following the structure of their associated actions.
The BodyContent type contains four main methods:
clearBody()
This is a version of the clear() method from JspWriter that is guaranteed not to 
throw exceptions.
getReader()
Get a reader into the contents of this instance.
getString()
As getReader() but returns a String.
writeOut(Writer)
Write out the content of this instance into the provided Writer.
getEnclosingWriter()
Get the 
JspWriter
 enclosing this 
BodyContent
.
5.4.6
The BodyTagSupport Base Class
The 
BodyTagSupport
 class is a utility class intended to be used as the base class for new 
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
.
105
JavaServer Pages 1.1 Specification  
November 30, 1999




JSP Web Hosting JavaServer Pages Specifications JSP Hosting




 
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved.