Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to log request size and response size

843842Jun 10 2009 — edited Jun 11 2009
Hi 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 9 2009
Added on Jun 10 2009
4 comments
792 views