Example2_2.jsp:
<% @ page contentType = "text / html; charset = GB2312"%>
<HTML>
<BODY BGCOLOR = cyan> <FONT size = 1>
<%! int i = 0;
%>
<% i ++;
%>
<P> You are the first
<% = i%>
Customers who visited this site.
</ BODY>
</ HTML>
===============================
(2) Example 3
Example2_3.jsp:
<% @ page contentType = "text / html; charset = GB2312"%>
<HTML>
<BODY>
<%! Integer number = new Integer (0);
%>
<%
synchronized (number)
{int i = number.intValue ();
i ++;
number = new Integer (i);
}
%>
<P> You are the first
<% = number.intValue ()%>
Customers who visited this site.
</ BODY>
</ HTML>