tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 16830] - Jasper do not reset BodyContent for tags with BodySupport and empty content
Date Tue, 23 Mar 2004 20:48:38 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=16830>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=16830

Jasper do not reset BodyContent for tags with BodySupport and empty content





------- Additional Comments From kin-man.chung@sun.com  2004-03-23 20:48 -------
OK, let's quote some specs first.  :-)

JSP 1.2 spec, p 177 (JSP.10.2 BodyTag) Under "Properties":

    "The setter method (setBodyContent) will only be invoked if
    doStartTag( ) returns EVAL_BODY_BUFFERED."

So it is obvious that if doStartTag returns SKIP_BODY, setBodyContent will not
be called.  But that was what I said before.

JSP 2.0 spec further tightens the condition (JSP.13.22 p 2-67):

    "The setter method (setBodyContent) will only be invoked if
    doStartTag() returns EVAL_BODY_BUFFERED and the corresponding
    action element does not have an empty body."

so setBodyContent will not be called if the body is empty also.

So technically, the patch suggested by Vit Timchishin actually violates the
spec, because setBodyContent will be called in places where it shouldn't.  I
won't be surprised if the patch breaks some TCK tests.

But does it make sense, you all ask?  Personally, I think it should be allowed
to reset the bodyContent to null in such cases, and it is an oversight in the
spec to not consider the interaction with tag pooling in this corner case.

I'll check with the JSP spec leads on this.  Unless I can find a fix that does
not break the spec, this bug will remain INVALID.

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


Mime
View raw message