Hi guys,

In page 106 of JSP 1.1 PR2 spec,  there are two methods defined in the BodyTag
Interface:
     doInitBody() and doAfterBody().

doInitBody():  Invoked before the FIRST time the body is to evaluated .....
<snip>.......
doAfterBody(): Invoked after EVERY body evaluation ...... <snip>....

My concern is this:
I would have found it useful if there were a method doBeforeBody() defined.
Is there a reason this method was not specified.  The method only makes sense
considering the existence of doAfterBody().

I page 100 of JSP 1.1 PR1 spec, this method was specified in the Tag class.  Why
was this method
removed from the spec?

The reason I wanted this method is that I make certain scripting variables
available to the body
of the tag.  The value of this variable is re-calculated at the beginning of
every iteration of the body.

Consider a loop tag.

<custom:loop start="<%= startIndex%>" count="<%= count %>">
</custom:loop>

It would be useful for the tag body to know the current iteration of the loop.
If there was a doBeforeBody(),
I could set the value of the scripting variable in this method.  Instead, I have
to set the value for next iteration
in the doAfterBody() method.  Doing it in the doAfterBody works fine, but it
just doesn't seem elegant.

I am running on Windows NT, Orion Server version 0.7.9


Thank you very much,
Sharath Komarla
PSDI

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to