• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Collect Servlet and JSP invocation stats in Tomcat

 
Srinivas Thurumella
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do we have a way to collect Servlet and JSP invocation stats in Tomcat?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can log every access / invocation by uncommenting the AccessLogValve entry in server.xml

Bill
 
Srinivas Thurumella
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to log it programatically. Like write a thread that wakes up every 5 mins and collects the number of times a Servlet has been invoked and if possible time it took to process a request.

As suggested by you, if I comment out the configuration in server.xml will it write to a file? Or do we have an API to retrieve the values?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic