<%! private static int total = 0; private static Object mylock = new Object(); %> <% if(session.getAttribute("no") == null) { synchronized(mylock) { total++; session.setAttribute("no", new Integer(total)); } } %> Du er nummer <%=session.getAttribute("no")%> ud af <%=total%>.