title: Is it possible to write a servlet filter to take inspect HTTP response codes?
body: <p>Is it possible to write a servlet filter to take inspect  HTTP response codes?</p>
  
  <p>I want to write a filter that will non-destructively inspect outgoing HTTP response codes.  But, there does not seem to be a <code>getResponseCode()</code> like method on the Response object.  </p>
  
  <p>It is also not clear to me how unhandled exceptions from the servlet are supposed to be dealt with.  I really don't want this filter to actually set anything.  Passive is good.</p>
  
  <p>Ideas?</p>
  
  <p>(My other approach involves writing a custom Tomcat valve, but that is not so portable.)</p>