Hi, is it possible to give me an answer for both? keith
-----Original Message----- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: 18 December 2006 14:35 To: Tomcat Users List Subject: Re: logging the all the request/response http messages for my application -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Keith, Keith Hawkridge wrote: > Hi, I have an application setup via a context and I want to view all the > http request/response messages that deals with this context. > > Is there any easy way to set this up with tomcats logging? Do you want to log all of the HTTP headers and parameters, or do you want to log all of the content, too? Logging the headers and parameters is pretty easy (including the headers being returned in the response). The most obvious way is to write a filter that just dumps that information wherever you want it. Some of Tomcat's valves may help (such as the RequestDumperValve - http://tomcat.apache.org/tomcat-5.0-doc/catalina/docs/api/org/apache/cat alina/valves/RequestDumperValve.html). If you want to log all of the content, then your job becomes more difficult, because the content of a request cannot be read twice. In order to capture and log the content, your filter will have to wrap the request and response in specialized objects that will serve that content out of buffers held for the purposes of allowing that data to be read multiple times. If you don't do this, some of your code may stop working. Good luck, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFhqcm9CaO5/Lv0PARAkmiAKCa3A+CdzJ/DfdVkczWe+xjzHGTmACfToNh ExJBjDrc3xAP0GgeciBAuSw= =PKuv -----END PGP SIGNATURE----- --------------------------------------------------------------------- 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]