Constructs to make Jersey ignore exceptions?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Constructs to make Jersey ignore exceptions?

I'm using Spring's method based security on my Jersey application.

When Spring throws an AccessDeniedException, Jersey intercepts that exception and maps it to whatever ExceptionMappers are in place.

Instead, if I could get Jersey to "pass" that exception along, then Spring security's Exception filters will come into play and invoke the AccessDeniedHandler. My access denied handler implementation sets headers and text on the HttpServletResponse.

So, is there anyway I can get Jersey to ignore certain exceptions?

If I put an ExceptionMapper in place for Spring's AccessDeniedException, I am forced to return a Response object and that ends the request cycle.