Jeff Turner wrote:
> Having a look through bug 652:
>
> BodyTag doInitBody and doAfterBody called on tags without body
>
> (http://znutar.cortexity.com/BugRatViewer/ShowReport/652)
>
> I don't think this is a bug.
>
> The JSP spec, p88, says:
>
> "If an action element can have a non-empty body and is
> interested in the content of that body, the methods doInitBody() and
> doAfterBody(), defined in the BodyTag interface are involved."
My interpretation of this is:
* Tag "foo" may have body
* Blah -> body methods called
* -> no body methods called
> Note, "can have", not "if it does have". So an element without a body, but
> that *could* have a body according to the TLD, still has do*Body methods
> called.
.. if it has a body *in the usage of it*, sure. Of course. But if it's
not *used* with a body, then the body methods should not be called.
> So:
> foo has do*Body() called (obviously).
> has do*Body() called (the body will just be blank)
> has do*Body() called, because according to the XML spec, this is
> shorthand for the notation, and therefore processes
> equivalently.
I see the two last ones as distinctly different, whereas the first two
are identical semantically. And I have a couple of tags that indeed
makes a major difference between and .
> Interestingly, JRun3.0 has the opposite bug, and doesn't call setBodyContent
> if the tag doesn't have a body but could.
To me that is correct.
> Eg, in JRun the following action breaks:
>
>
Why? How is this tag dependent on a body to be supplied?
> But this works:
>
>
>
> The taglib in question is from the Jakarta Taglibs project.
To me this hints at a bug in the Jakarta Taglibs.
It might be beneficial to send a query about this to the JSP spec
writers, since it's a rather important issue. I have CC'ed
[EMAIL PROTECTED]
regards,
Rickard
--
Rickard Öberg
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]