You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jochen Wiedmann <jo...@softwareag.com> on 2001/09/03 11:01:54 UTC

[Patch] TC3.2: error-page directive is not properly supported by Jasper

Hi,

I have just submitted #3377 to Bugzilla, where I
describe the following problem and a workaround.

When using the error-page directive in web.xml, the
exception handling of JSP pages is insufficient. What
happens is that Jasper catches the exception, but isn't
aware of the configured error-page. As it may throw
only ServletExceptions, it does exactly that, discards
the actual exception, keeps the exception message and
creates a new ServletException. (See handlePageException().)

In practice that means, that the stack trace is lost in
error messages, making them practically useless, because
you always see the stack trace of handlePageException().

IMO Jasper should have a possibility to see the error-page
directive and handle it properly. In our production environment
we do this with the attached patch, which is mainly a
workaround, because it breaks the separation between
TomCat and Jasper. However, as the Specification does not
give a way to find the configured error-page (at least no
way that I can think of), this is probably the way to
go.


Thanks,

Jochen