How can I get the HTTP status code out of a ServletResponse in a ServletFilter?

Posted by Seth Weiner on Stack Overflow See other posts from Stack Overflow or by Seth Weiner
Published on 2009-08-19T19:17:17Z Indexed on 2010/04/29 6:37 UTC
Read the original article Hit count: 379

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 it to a HttpServletResponse. Is there a way to get access to this value within a ServletFilter?

© Stack Overflow or respective owner

Related posts about java

Related posts about servlets