geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From solprovi...@apache.org
Subject Re: Access logging
Date Thu, 28 Jun 2007 21:12:36 GMT
On 6/28/07, bdushok <bdushok@luzerne.edu> wrote:
>
> Can anyone point me toward any documentation on how to set up access logging?
> I have apps running on Geronimo 1.1.1 and would like to obtain access info
> for individual jsp pages and servlets.
>
> Thanks,
> Bob

Logging hits is problematic on the Web.  Are you checking server load,
or do you want the actual number of times each page is opened?

For server load, check the logs of the http engine.  For Geronimo,
those logs would be generated by Tomcat or Jetty.

For secure pages, the server logs may also be good enough since the
browser will usually contact the server.

For the real number of times a page is opened or a link is clicked,
you need to work around Internet caching.  That requires JavaScript or
some other technology that can dynamically generate URLs.  Google
Analytics is a free version.  I recently wrote a simple WAR to handle
this for a confidential application with two parts:
1. JavaScript added to every page or link you want to log.  The URL
must be unique.  I add the datetime and a random number to make
certain each URL is unique.  This required  5 lines of JS for a
function plus one call for each item being logged (the page or a
link.)
2. A Servlet that accepts the URL and logs information.  I used log4j
so the Java code fit on one screen.  I made almost everything
configurable from web.xml.

solprovider

Mime
View raw message