You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2001/10/23 11:09:43 UTC
DO NOT REPLY [Bug 4359] New: -
BodyTag : doInitBody() shouldn't be called when the doStartTag() method returns EVAL_BODY_INCLUDE
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4359>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4359
BodyTag : doInitBody() shouldn't be called when the doStartTag() method returns EVAL_BODY_INCLUDE
Summary: BodyTag : doInitBody() shouldn't be called when the
doStartTag() method returns EVAL_BODY_INCLUDE
Product: Tomcat 4
Version: 4.0.1 Final
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: simon_g_brown@yahoo.com
According to the JSP 1.2 spec (10.2.2 - Methods section), the doInitBody()
method is only called when doStartTag returns EVAL_BODY_BUFFERED. In the
generated code, the call to doInitBody() is called outside of the block that
pushes a new BodyContent onto the stack and subsequently passes this to the tag
handler with the setBodyContent method.
Example of the generated code is as follows.
if (_jspx_eval_xxx_filter_0 !=
javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = pageContext.pushBody();
_jspx_th_xxx_filter_0.setBodyContent
((javax.servlet.jsp.tagext.BodyContent) out);
}
_jspx_th_xxx_filter_0.doInitBody();
The doInitBody() call needs to put placed wihtin the if block so that it is
only called when the body content is set on the tag handler.
Thanks
Simon