The follow email discussion happened on tomcat-dev back in January.  In
reviewing the open bugs for Tomcat 3.2.2 I came across this issues again and
I'm trying to decide if it should dealt with, marked invalid, etc.

Did anyone hear anything back from jsp-comments?  For that matter, has any
*ever* heard anything back from jsp-comments?  I've never received a single
response to any message I've ever sent to that address.

------------------

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
* <x:foo>Blah</x:foo> -> body methods called
* <x:foo/> -> 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:
>  <my:tag>foo</my:tag> has do*Body() called (obviously).
>  <my:tag></my:tag> has do*Body() called (the body will just be blank)
>  <my:tag/> has do*Body() called, because according to the XML spec, this
is
> shorthand for the <my:tag></my:tag> 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 <x:foo></x:foo> and <x:foo/>.

> 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:
>
> <util:include url="foo.html"/>

Why? How is this tag dependent on a body to be supplied?

> But this works:
>
> <util:include url="foo.html"></util:include>
>
> 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to