I\'m trying to report on every HTTP status code returned from my webapp. However the status code does not appear to be accessible via the ServletResponse, or even if I cast
Since Servlet 3.0, there's a HttpServletResponse#getStatus().
So, if there's room for upgrading, upgrade to Servlet 3.0 (Tomcat 7, Glassfish 3, JBoss AS 6, etc) and you don't need a wrapper.
chain.doFilter(request, response); int status = ((HttpServletResponse) response).getStatus();