Global Servlet Filter  
Author Message
Mark F





PostPosted: 2004-11-3 21:10:00 Top

java-programmer, Global Servlet Filter I'm writing a servlet filter that will keep track of the number of hits
for my site but the site is composed of several web applications. I'd
like to write it in such a way as to allow it to work with all of the
applications at one time, instead of tallying individual counts by hand.

Any pointers or suggestions are appreciated.

Thanks,
-Makr
 
John C. Bollinger





PostPosted: 2004-11-3 23:40:00 Top

java-programmer >> Global Servlet Filter Mark F wrote:

> I'm writing a servlet filter that will keep track of the number of hits
> for my site but the site is composed of several web applications. I'd
> like to write it in such a way as to allow it to work with all of the
> applications at one time, instead of tallying individual counts by hand.

You are barking up the wrong tree. The servlet spec does not provide
for objects scoped wider than a single web application. It might be
that you could play tricks with a shared object, but making it work
correctly would be container-dependent. Since you need a
container-dependent solution anyway, why don't you look at configuration
options for your container?


John Bollinger
email***@***.com
 
Mark F





PostPosted: 2004-11-4 0:18:00 Top

java-programmer >> Global Servlet Filter John C. Bollinger wrote:
> Mark F wrote:
>
>> I'm writing a servlet filter that will keep track of the number of
>> hits for my site but the site is composed of several web
>> applications. I'd like to write it in such a way as to allow it to
>> work with all of the applications at one time, instead of tallying
>> individual counts by hand.
>
>
> You are barking up the wrong tree. The servlet spec does not provide
> for objects scoped wider than a single web application. It might be
> that you could play tricks with a shared object, but making it work
> correctly would be container-dependent. Since you need a
> container-dependent solution anyway, why don't you look at configuration
> options for your container?
>
>
> John Bollinger
> email***@***.com

Thanks, I'll look into it.

-Mark