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 38376] New: - Body content stack may not be properly maintained in the faces of exceptions
Date Wed, 25 Jan 2006 04:37:06 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=38376>.
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=38376

           Summary: Body content stack may not be properly maintained in the
                    faces of exceptions
           Product: Tomcat 5
           Version: 5.5.14
          Platform: All
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: apache@deigh.com


The code that increments _jspx_push_body_count_XXX[0], which is the count of the
number of outstanding calls to _jspx_page_context.pushBody() within a try block,
is properly within the conditional that is true only if doStartTag() returns
EVAL_BODY_INCLUDE. The corresponding code that decrements the same variable,
however, is not within the corresponding conditional, although the call to
_jspx_page_context.popBody() is. The outstanding count may therefore be wrong,
and the code that pops these extra BodyContents in the finally block pops too
few. In the following Jasper-generated code snippet, note that
_jspx_push_body_count_rwc_dbTry_0[0]++ on the third line is conditional, but
_jspx_push_body_count_rwc_dbTry_0[0]-- on the last line is not.

Jasper-generated code snippet:

if (_jspx_eval_rwc_formPhase_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_push_body_count_rwc_dbTry_0[0]++;
_jspx_th_rwc_formPhase_0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_rwc_formPhase_0.doInitBody();
}
do {
...

int evalDoAfterBody = _jspx_th_rwc_formPhase_0.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
if (_jspx_eval_rwc_formPhase_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
out = _jspx_page_context.popBody();
_jspx_push_body_count_rwc_dbTry_0[0]--;  // THIS SHOULD BE IN THE IF BLOCK!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message