tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Capturing a complete request (free filter code!)
Date Mon, 02 Mar 2009 22:47:42 GMT
-----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-----

Mime
View raw message