Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

web counter

Status
Not open for further replies.

dobbyg

MIS
Mar 24, 2003
6
NZ
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.

Dobby
 
>>> We only use java servlets.

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 ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top