The structure of our web application following the structure of Sun's PetStore, that is:
MainServlet-----forward----->template.jsp---include---->abody.jsp---errorPage-->myexception.jsp
abody.jsp use the errorPage directive to direct to an error page for error processing when a tag in abody.jsp throws an exception.
For our web application, the problem is that when an exception is thrown in the tag, myexception.jsp is executed, but the content in myexception.jsp is not sent to the client(browser), only the content in template.jsp is displayed by the browser.
To solve the problem, I create a simple test web application following the above structure but rewrite all the code required by the structure(to simply the case). The web application works fine. The content in myexception.jsp is sent out to browser, but the content in template.jsp is not sent to browser.
I donot know why our web application behaves differently. Could some one kindly tell me how to study the problem further(the direction, or pay attention to some part of the web application).
Thank you very much.
Platform: JBoss 3.2.5, JDK 1.5beta2
I find the problem
The tag embedded in template.jsp use
pageContext.getOut().flush();
remove it will solve the problem, but the output is not correct in order.