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 <
ch...@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-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to