tomcat-dev mailing list archives

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

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
Iteration-
Tag." 

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
iterations,
doEndTag() is invoked." 

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

 It seems the patch is valid.

Dimitry

>Dimitry,

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

>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
synchronization
>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.

>Jan




--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message