Thanx tim,
I have one last question, which would be probably the hardest to answer...

How do I now _which_ servlet is behind me in the chain?

regards
Leon

On 5/26/06, Tim Funk <[EMAIL PROTECTED]> wrote:
Yes you will ...
doFilter(...) {
   // log and set other timing variables
   try {
     chain.doFilter(...)
   } finally {
     /*
        servlet done executing - log some more
     */
   }
}

If the filter is invoked on includes and forwards too - you can also get more
granually logging.

-Tim

Leon Rosenberg wrote:

> I'm not sure I will have control of the end of the servlet execution
> with the filter, would I?
>
> regards
> Leon
>
> On 5/26/06, Tim Funk <[EMAIL PROTECTED]> wrote:
>
>> You might have an easier time using a Filter. But this might not offer
>> the
>> same amount of granularity. (Using a HttpServletRequestWrapper() might
>> help too)
>>
>> -Tim
>>
>> Leon Rosenberg wrote:
>> > Hi,
>> >
>> > sorry if my research hasn't been very deep, but does someone know how
>> > to patch the servlet instantiation in tomcat the easiest way?
>> > The background is, that I'd like to insert an own class (via
>> > java.lang.reflect.Proxy) between the connector and the actual servlet
>> > instance to perform some additional operations on each call to servlet
>> > (like logging, monitoring, etc).

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to