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 [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | ------- Additional Comments From [EMAIL PROTECTED] 2004-03-24 10:15 ------- 1) We are NOT talking about SKIP_BODY. Here are example: --- <p><c:out value="${null}">Default</c:out> <p><c:out value="${null}"></c:out> --- Output: --- <p>Default <p>Default --- Should be: --- <p>Default <p> --- c:out in both cases returns EVAL_BODY_BUFFERED and according to Kin in 1.2 case setBodyContent MUST be called: ---- 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." --- According to JSP 2.0 it should not be called, so we have a collision. Even more, according to JSP 2.0 JSP.13.2.3.3 Methods of BodyTagSupport public BodyContent getBodyContent() Get current bodyContent. Returns: the body content. It must work OK in all cases, while it's not and even can't because it has no means to reset it's bodyContent (we are not required to call super.doStartTag()) if working according to JSP 2.0 specs. It does not say that return is undefined if tag is empty (remember, we are not talking about SKIP_BODY). My proposal that I think will make everything OK is another patch that will send tags with equal attributes but ones using and ones not using body to two different pools. Actually this was my first thought, but this would require more deep knowledge of Jasper code I do not have (yet, with all this bugs :( ). I suppose this will fix the problem and won't violate any specs (but JSP 1.2 that still require for setBodyContent to be called if tag returned EVAL_BODY_BUFFERED no matter if body was empty or not). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]