File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes jsp counter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp counter" Watch "jsp counter" New topic

jsp counter

Hansy Be

Joined: Dec 11, 2003
Posts: 2
Hi friends!
i hv a simple coding of counter in jsp and its go on working well but when server is restarted then its go on counting from start i.e 1 and all the previous countings are vanished.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Yep, sounds like you need to add persistence to your counter by storing the count in a file or preferably a database.
I agree. Here's the link:
subject: jsp counter
It's not a secret anymore!