tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anantha Padmanabha <anantha.padmana...@bankbazaar.com>
Subject Re: Custom response header not working because of Content Length
Date Tue, 11 Aug 2009 05:13:15 GMT
I wrould read more about struts's request-response cycle.

The only reason is I am trying to add to response header is that I can dump
my custom response headers in apache logs.
That way, all latencies would be tied together making it easy for parsing
and analysis.

In case of different log files for say, apache,tomcat,mysql,external
services etc, there must be a common id to tie them and script would be
little more complicated

Thanks
Anantha

On Mon, Aug 10, 2009 at 10:47 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message