This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes How to get the applicaiton usage report Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to get the applicaiton usage report" Watch "How to get the applicaiton usage report" New topic
Author

How to get the applicaiton usage report

gowrishankar sundararajan
Greenhorn

Joined: Apr 10, 2007
Posts: 6
Hi all,

i have hosted a applicaiton in tomcat http://localhost:8080/sample

wanted to know if we can track the number of hits this applicaiton takes

i need to store it and retrieve it later.

can i get some inputs on the same?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

As I recall. Tomcat has a way to configure access logs. But it's been a long time since I've used that so I don't know the details.

Someone more Tomcat-savvy might chirp in, or you could start looking through the Tomcat docs.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41137
    
  45
You could configure a servlet filter for all servlets/JSPs, and do the appropriate accounting in that.


Ping & DNS - my free Android networking tools app
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

In tomcat/conf/server.xml, look for access-logging.
Select the logger you want to use (there is a description of each in the comments) and uncomment the valve for the logger you want to use.
Restart tomcat and the access logs will start showing up in tomcat/logs.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
Don't get me started about those stupid light bulbs.
 
subject: How to get the applicaiton usage report
 
Similar Threads
servlet
Axis2- Enabling Admin service
How to get the applicaiton usage report
where can i get tomcat admin package
Url of web aplpication