tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anantha Padmanabha <>
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


On Mon, Aug 10, 2009 at 10:47 PM, Christopher Schultz <> wrote:

> 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
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla -
> Jz4Anji4D5dIzUrbetYLKpxhAsae4Dbv
> =03EW
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message