• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to maintain a counter in jsp to know how many times the page is visited?

 
ilias basha
Ranch Hand
Posts: 55
Eclipse IDE Java Windows
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a servlet code where an instance variable of Sevlet will be incremented each time the Servlet's service/doGet/doPost is invoked. By this way i am able to know how many times the partcular Servlet is requested..

here is code for the same.


My Question is now how to write a jsp which is exactly equivalent to the above given Servlet - specifically with respect to having an instance variable??
 
santosh dhulipala
Ranch Hand
Posts: 52
  • 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

this can be done by putting the variable in application scope incrementing by geting the value from scope and restoring by which it can be accesed from jsp's hope i am correct

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic