users@glassfish.java.net

web.xml error-page: How to prevent wrapping in ServletException

From: Dominik Dorn <dominik.dorn_at_gmail.com>
Date: Fri, 6 Aug 2010 21:40:32 +0200

Hi,

I throw exceptions within my servlets and want to use the error-page
mechanism in web.xml
However, every Exception I throw gets wrapped in a ServletException
which then requires
me to unwrap it in the error-page itself, making the multiple
error-page entries in web.xml useless.

Is there a way I can specify that certain or all exceptions are not
wrapped within a ServletException
so that the error-page mechanism in web.xml works as expected?


Thanks,
Dominik
-- 
Dominik Dorn
http://dominikdorn.com
http://twitter.com/domdorn
http://www.lyrix.eu/lyrics/Linkin-Park/