The Java servlet API does not provide a getStatus method for HttpServletResponse until version 3.0. I have created a HttpServletResponseWrapper with getStatus to wrap HttpServletResponse and catch the status when it is set.
This does not work with my Jersey 2 servlet.
My HttpServletResponseWrapper is passed via the doFilter(request, wrapperResponse) of my Filter. The Filter is called but the getStatus method is not called when a Jersey RESTful Servlet is the endpoint.
Is there any configuration I have missed?
I use the response builder to return the result and set the status.
Response.status(404).build(); Response.status(200).type(mediaType).entity(theEntity).build();
Best Regards Jochen