<%----------------------------------------------------------- Copyright © 1999, Oracle Corporation. All rights reserved. ------------------------------------------------------------%> <%-- Initializes counts to zero --%> <%-- Consider storing pageCount persistently -- If you do read it here --%> <%-- Acquire beans --%> <% application.log("The number of page hits were: " + pageCount.getValue() ); %> <% application.log("The number of client sessions were: " + sessionCount.getValue() ); %> <%-- Consider storing pageCount persistently -- If you do write it here --%> <%-- Acquire beans --%> <% synchronized (sessionCount) { sessionCount.setValue(sessionCount.getValue() + 1); %>
Starting session #: <%= sessionCount.getValue() %>
<% } %> <% synchronized (activeSessions) { activeSessions.setValue(activeSessions.getValue() + 1); %> There are currently <%= activeSessions.getValue() %> active sessions

<% } %> <%-- Acquire beans --%> <% synchronized (activeSessions) { activeSessions.setValue(activeSessions.getValue() - 1); } %>