There seems to be an issue(bug?) when handling a run time exception from
within <jsp:include> of Tomcat 3.1.   If you implement the three small files
as below(error.jsp, temp.jsp, and badcode.jsp), you should be able to
reproduce my issue.  In theory, it should display "You got an error".
Unfortunately, the system displayed it's ugly head and stated "Included
servlet error: 500 ..... java.lang.IllegalStateException: Cannot forward as
OutputStream or Writer has already been obtained."  Are there any work
around for this issue?

Scott

(Note: please create the following files with the code as shown in a jsp
directory such as "errortest")

error.jsp:
<%@ page isErrorPage="true" %>
<%= "You got an error" %>

temp.jsp:
<%@ page errorPage="error.jsp" %>
<HTML>
<TITLE>Blah</TITLE>
</HEAD>
<body>
text here
<jsp:include page="/jsp/errortest/badcode.jsp" flush="true" />
more text
</BODY>
</HTML>

badcode.jsp:
<%@ page errorPage="error.jsp" %>
<% int i = 5/0; %>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to