• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get the applicaiton usage report

 
gowrishankar sundararajan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could configure a servlet filter for all servlets/JSPs, and do the appropriate accounting in that.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic