Yair,

I too would be interested in this. I wrote a logging filter that does what you describe, but the best that I could come up with was a response wrapper that was passed along the filter chain. In the wrapper, I could set a status, thus guaranteeing that I would end up with a status at the end. The wrapper extends HttpServletResponseWrapper.

You may also find a wrapper useful because response sizes are not always set either, at least in my experience. With the wrapper, you can monitor the output stream to get a byte count.

B.

Yair Zohar wrote:
Hello,
I'm trying to create a filter that will do the access logging for my web application (I would like to write the information directly to the database not to a file).
I have a problem to get the status code of the response.
The filter receives a ServletResponse object that do not have a getStatus() method.
Any idea ?
Yair Zohar.




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to