Ralph,

> I think there is a serious bug in the jsp compiler from tomcat 4.1.10.
> The compiler creates wrong code for nested variables. Here an example
> that works with 4.1.9 and does not with 4.1.10

OK, I really think the spec needs to be clarified in this respect.

JSP.10.5.9 ("VariableInfo") of the JSP 1.2 spec has this:

  The scope value for a variable implies what methods may affect its
  value and thus where synchronization is needed:

  - for NESTED, after doInitBody and doAfterBody for a tag handler
    implementing BodyTag, and after doStartTag otherwise.

  - [...]

This does not special-case tag handlers implementing IterationTag
(which is implemented by TagSupport), which, according to
JSP.10.1.2.4, are supposed to have their scripting variables
synchronized after the call to doAfterBody(), and therefore Jasper was
missing this synchronization step for tag handlers implementing IterationTag.
This issue had been filed as Bugzilla Bug 11552 ("Iteration tags do
not resynchronize scripting variables after doAfterBody()") and was
fixed, but as part of the fix I also removed synchronization of
NESTED variables after doStartTag() for tag handlers implementing
IterationTag.

So what the spec really should say is the following:

  - for NESTED, after doInitBody and doAfterBody for a tag handler
    implementing BodyTag,
    after doStartTag and doAfterBody for a tag handler implementing
    IterationTag, and after doStartTag otherwise.

Does this make sense? If so, I'll add the synchronization of NESTED
variables after doStartTag for tag handlers implementing IterationTag.


Jan



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to