tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ethan Wallwork" <>
Subject RE: Hello? Anybody?
Date Thu, 02 Nov 2000 23:13:36 GMT
The way Tomcat implements handlePageException() isn't really the source of the
problem here.  Yes, if there is an error page defined, then it will stop the
exception from propagating.  If there isn't, then Tomcat just rethrows the
exception.  This is good.  The problem happens when this exception gets thrown
out of the JSP servlet's service() method and caught Tomcat.  At this point it
dealt with the way Tomcat deals with exceptions thrown from servlets.  This is
the place that needs changing so it instead propagates the exception if this is
a forward/include from a RequestDispatcher.

RequestDispatcher calls ServletWrapper.service(), which in turn calls it's
superclasses (Handler) service() method.  Neither of these methods declare they
throw ServletException or IOException, so there is no chance that these
exceptions are going to get propagated back to the RequestDispatcher (barring
sneaky handoffs).


-----Original Message-----
From: Craig R. McClanahan []
Sent: Thursday, November 02, 2000 12:50 PM
Subject: Re: Hello? Anybody?

Larry Isaacs wrote:

> Thanks Craig,
> To support this behavior, should the spec require that for a JSP that is
> "included" or "forwarded", handlePageException() is required to propagate
> the exception back to the caller?  Currently, it just says that if there is
> no error page, it should "perform some implementation dependent action."
> Was the "implementation dependent action" intended only for the original,
> i.e. non-"included" and non-"forwarded", servlet or JSP?

Yah, the JSP spec's description of PageContext.handlePageException() is not
helpful in the included/forwarded scenario.  It would seem to me that you'd
want to
throw IOException or ServletException (assuming that there is no error page
under any circumstance -- included/forwarded or not -- so that the servlet
would handle this problem for JSP pages just like it does for servlets.

 I'll forward a comment suggesting this clarification to the spec lead
(  It will need to get discussed by the JSR-053

> Larry


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message