tags:

views:

14

answers:

1

When working with Websphere 7.0, RuntimeExceptions thrown from the Filter.doFilter are wrapped in a ServletException, instead of being propagated as they are.

Is there any way of configuring Websphere to throw the original exception instead of wrapping it?

+1  A: 

No because then the app container wouldn't know how to handle them.

Just use getCause() to get the original exception if you have your own error handler.

Aaron Digulla
Thanks, that is my contingency plan. As this is an existing application - and I'm not sure I found all the places where this assumption is made - I would prefer to ask WAS to do it for me. If that's not possible, I will unwrap the `ServletException` wherever I find a problem.
Robert Munteanu
WAS won't :-) Just check which kind of exception you get and unwrap it if it's `ServletException`.
Aaron Digulla