tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimitry Ivanov" <>
Subject RE: [PATCH] Iteration tags do not synchronize scripting variables after doStartTag
Date Tue, 07 Jan 2003 02:41:56 GMT

Two quotes from JSP.10.2.2 ("BodyTag") in JSP 1.2 spec. 

Quote 1 (on page 177 second paragraph):
"If EVAL_BODY_INCLUDE is returned, then evaluation happens as in

Quote 2 (on page 178, last paragraph):
"If EVAL_BODY_INCLUDE is returned, setBodyContent() is not invoked,
doInitBody() is not invoked, the body is evaluated and "passed through"
to the
current out, doAfterBody() is invoked and then, after zero or more
doEndTag() is invoked." 

 Generator shouldn't generate call to doInitBody when EVAL_BODY_INCLUDE 
returned by doStartTag.

 It seems the patch is valid.



>> In jasper2, I have found one interesting bug. It hapens when tag
>> implements BodyTag interface and doStartTag returns
>> See test-case and patch attached. The patch tested under Tomcat

>the current synchronization behaviour your are seeing is compliant
>with the spec.

>Attached is the latest javadocs of
>javax.servlet.jsp.tagext.VariableInfo (from the upcoming JSP 2.0),
>which contains a table listing the various variable synchronization
>points for the different tag handler types (see section entitled
>"Synchronization Protocol").

>As you will notice, there is a synchronization point for instances of
>BodyTag after the invocation of doInitBody(), but not after
>doStartTag(). Only instances of Tag or IterationTag have a
>point after doStartTag().

>This is consistent with the description of the Synchronization Protocol

>in JSP.10.5.9 ("VariableInfo") in JSP 1.2. 

>Therefore, your proposed patch is invalid.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message