how to log request size and response size
843842Jun 10 2009 — edited Jun 11 2009Hi all,
I have a requirement to log data usage per session for a user. To do this, I think there should be a way to log the sizes of each request/response in a user session. I'm just thinking what is the best way to accomplish this. Is using ServertRequestWrapper/ServletResponseWrapper a good way? I'm supposing to log the number of bytes read and write in corresponding wrapper using custom InputStream/OutputStream. Another concern is that the number of bytes may not be same as those transmitted via network. Any comment is appreciated.