tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject JSP errorPage: forwarding vs. including
Date Mon, 18 Sep 2000 13:51:55 GMT
Question about org.apache.jasper.runtime.PageContextImpl, line 381
(Tomcat 3.1 release):

Why do we forward rather than include errorPageUrl in method
handlePageException()?  Although I'm sure there's a good reason for
doing so, forwarding to the error page prevents a useful error message
from being displayed if there was a previous call to
pageContext.include  or a <jsp:include> before the Exception is thrown.
You'll get an IllegalStateException "Cannot forward as OutputStream or
Writer has already been obtained" instead.

Changing the line to "include(errorPageURL)" works beautifully.

-- Bill

View raw message