you need to use the following tag :
<% int i =0 %>
<%=i++%>



Enrique P�rez Soler wrote:

> Hi all,
>
> With the following JSP:
> <%! int i = 0 %>
> <%=i++%>
>
> Each time I reload the JSP in my browser, I get the incremented value.
> But if someone else loads the same JSP, the counter starts at i+1,
> and not at 0.
>
> How can I separate both sessions?
>
> Thank you.
>
> --
>
> --------------------------
> "El bit es al hombre lo que el �tomo a Dios"
> Enrique P�rez Soler
> mailto:[EMAIL PROTECTED]
> http://ttt.teleco.upv.es/~enpeso
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to