Lets say I have this piece of code
<html> <body> <h1> This is a counter example </h1> <%! int i=0; %> <% i++; %> Hello World! <%= "This JSP has been accessed "+i+" times" %> </body> </html>
Every time I reload the page i goes ++.
So, why that happens? Is it something like cached memory that saves i and when I run it remembers the previous values?
Just confused between that and sessions.I thought you used session to acomplish that.
Any explanation will get me out of this confusing mess