Tomcat 4 supports filters, which may do exactly what you want. They are
defined on the 2.3 spec IIRC. Basically, its a bit of code that gets
accessed before the requested page. There was an article about the use of
filters i think either on javaworld or servlets.com. Assuming you want a 3.2
anwser, then you could direct all traffic through a servlet (or several)
which does the logging, and then have that servlet forward on to the
original page, e.g.:

http://myserver.com/LogAccess?page=userpage.jsp

Would log access from the client, and forward the user to userpage.jsp. Of
course, you could equally develop some tags to automatically log the
request.....

sam
----- Original Message -----
From: "Roland Carlsson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 18, 2001 9:44 AM
Subject: Logging


> Hi!
> I wonder if it's possible to put a servlet or bean to pre-process all or
some of the requests that a tomcat-server will serv? The use I'm thinking of
is customized logging to be able to track sessions much closer than the
apache common log does without have put logging-code on every page that is
requested.
>
> Regards
> Roland Carlsson
>
>

Reply via email to