Jan, I'm not agree. :)
In accordance to spec JSP.10.2.2 (BodyTag): "If EVAL_BODY_INCLUDE is returned, then evaluation happens as in IterationTag." The scripting variable synchronization is part of evaluation, isn't it? I think, if container doesn't synchronize scripting variables it explicitly conflicts with quoted requirement. On the other hand, if container synchronizes scripting variables after skipped invoke to doInitBody, it doesn't conflict with spec. Substantiation: Again JSP.10.2.2: "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." There is nothing about skipping variable synchronization. And JSP.10.5.9: "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. - for AT_BEGIN, after doInitBody, doAfterBody, and doEndTag for a tag handler implementing BodyTag, and doStartTag and doEndTag otherwise." There is nothing about synchronization *only* when doInitBody has *invoked*. I think it means the *state* not the action. When call to doInitBody skipped (doStartTag returned EVAL_BODY_INCLUDE) "After doInitBody" *state* comes just after doStartTag call. Dimitry -- P.S. Excuse me for my not ideal English. :( -----Original Message----- From: Jan Luehe [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 4:08 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PATCH] Iteration tags do not synchronize scripting variables after doStartTag Dimitry: I still believe your patch is invalid, as it would amount to synchronizing AT_BEGIN and NESTED variables after calling doStartTag(). However, the spec explicitly mentions that for tag handlers implementing BodyTag, those variables must not be synchronized after doStartTag(), *only* after doInitBody(). When I run your example (without applying your patch), I get this result: doStartTag returns EVAL_BODY_INCLUDE null 2nd 3rd doStartTag returns EVAL_BODY_BUFFERED 1st 2nd 3rd The reason your are getting "null" in the case of doStartTag() returning EVAL_BODY_INCLUDE is that in this case, doInitBody() is not called, hence no synchronization. However, if doStartTag() returns EVAL_BODY_BUFFERED, doInitBody() is being called, and therefore synchronization does take place. Please let me know if you disagree. Jan -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>