I need to maintain a count for hits on couple of pages. Not for the display the number of visitors in the website. Rather, it is for tracking sensitive information access(maintained in web pages) times in the applications. User will not be having any login to the system and hence no session tracking. I am expecting this would be pretty simple but I donno it. Please help me out. Any help is appreciated.
Joined: Nov 11, 2000
Please help me JSP techniques to handle hit counts of the page w/o the user login. The nature of the counter pretty much same as visitors counter in the webpages. In my case I don't need to display in the page at all. Counts would stored in the server and may it can be re-initialized once server is down. Please help me out if any one did that in their project.
You might want to initialize a static variable in a java class constructor and load this class at the time of server startup. Then your jsp page can just increment the variable as a regular feature, without having to worry about the counter value. You can use the same java class to store the counter variable in DB or where-ever required. Hope it helps.