2010/5/12 bryan jacobs <[email protected]>:
>
> <error-page>
>
> <exception-type>org.lds.lua.directory.exception.LuaSecurityException</exception-type>
> <location>/error.html</location>
> </error-page>
>
> However, if I change the above configuration to:
>
> <error-page>
> <exception-type>java.lang.RuntimeException</exception-type>
> <location>/error.html</location>
> </error-page>
>
> and have my class throw a RuntimeException then the error.html page is
> displayed.
>
Can you prepare a simple war file (including source code), that
reproduces this issue, and file a bug report?
The place where exception handling is implemented is
org.apache.catalina.core.StandardHostValve
The exception is processed by #throwable(..) method there and the
error page is found by #findErrorPage(context, throwable).
I do not see where that code can go wrong. It might be though that you
have a misprint in your exception class name in web.xml. The code
does not check that the mentioned exception class exists. It just
compares strings: the name of the exception class and the name
configured in web.xml.
Also, on an error page you should be able to access the exception as
request.getAttribute("javax.servlet.error.exception")
see SRV.9.9.1
so you will be able to see what is actually caught by Tomcat.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]