tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Custom response header not working because of Content Length
Date Mon, 10 Aug 2009 17:17:40 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anantha,

On 8/10/2009 11:45 AM, Anantha Padmanabha wrote:
> I'm using struts2 application. I want to add some latencies [say mysql, our
> components and tomcat itself] to header, so that I can print this in Apache
> logs. Then looking at single apache log file, I would then be able to see
> what took time.
> Is it possible to achieve this in any way?

You should read about struts2's interceptors: they were designed to do
this exact thing because they can be placed between stages of request
processing. For instance, you can time certain events /before/ the
result is rendered, and add information to anything you like.

I would recommend logging to a log file and not to response headers.
That would solve your problem either way, since response headers would
not be involved.

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

iEYEARECAAYFAkqAVjQACgkQ9CaO5/Lv0PDjugCePeEzPCarXly37P0Da5JfC5aG
Jz4Anji4D5dIzUrbetYLKpxhAsae4Dbv
=03EW
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message