tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ethan Wallwork" <ethan.wallw...@net-linx.com>
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).

--
Ethan

-----Original Message-----
From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
Sent: Thursday, November 02, 2000 12:50 PM
To: tomcat-dev@jakarta.apache.org
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
very
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
defined)
under any circumstance -- included/forwarded or not -- so that the servlet
container
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
(jsp-spec-comments@eng.sun.com).  It will need to get discussed by the JSR-053
expert
group.

>
> Larry
>

Craig




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



Mime
View raw message