Can I configure tomcat to give me a list of hits to the site? I suppose a web counter is what I want.
Would I be better off using Apache (does it have a web counter) and tomcat together? We only use java serverlets.
In that case, I am presuming you have a "first point of contact" servlet, like a login action or something. Anyway, in this servlet, declare a class variable and initialize on the init() method. Then in your doPost() or doGet() methods, increment the counter each time the method is called. Then in the destroy() method, save the counter to a file/db, and read in again in init() when tomcat is restarted ...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.