You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2009/03/02 23:47:42 UTC

Re: Capturing a complete request (free filter code!)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

All,

On 2/20/2009 12:49 PM, Christopher Schultz wrote:
> So, I'm resuming my efforts to complete the response side of the
> equation. I'll post more code when it's available.

Okay, I've got my filter written. A reminder of the requirements:

- - Capture request as seen by the application
- - Capture response emitted by the /application/

Note that the last requirement does not include standard headers such as
"Date" and the default status code. Only messages actually generated by
the application are captured.

For those interested in seeing some techniques, these items are covered
by the code:

- - how to wrap a servlet input stream and reader
- - how to make a copy of streaming data
- - how to figure out which request parameters are GET versus POST
- - how to wrap a servlet output stream and writer

Again, comments and questions are welcome.

Enjoy,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmsYg4ACgkQ9CaO5/Lv0PBtCwCgj9apHnSGHkQ5Dm0ZLkBQdISs
jm0AnR1CDifx2SKdKcMrtBQr7vsYOnbz
=gHd2
-----END PGP SIGNATURE-----