• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to get the applicaiton usage report

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could configure a servlet filter for all servlets/JSPs, and do the appropriate accounting in that.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic