Is it possible to write a servlet filter to take inspect HTTP response codes?
I want to write a filter that will non-destructively inspect outgoing HTTP response codes. But, there does not seem to be a getResponseCode()
like method on the Response object.
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.
Ideas?
(My other approach involves writing a custom Tomcat valve, but that is not so portable.)