UP PREVIOUS NEXT   Technologies Internet et Education, © TECFA
  5. Session tracking

5. Session tracking

Exemple 5-1: Session tracking I

<%@ page session="true" %>
 
<%
// Get the session data value
Integer ival = (Integer) session.getValue ("sessiontest.counter");
if (ival == null) ival = new Integer (1);
else ival = new Integer (ival.intValue() + 1);
session.putValue ("sessiontest.counter", ival);
%>
    You have hit this page <%= ival %> times.<br>
<%
    out.println("Your Session ID is " + session.getId() +  "<br>");
%>		 
<p>Click here to see the <a href="session-track.jsp.text">source</a>
</body></html>

Exemple 5-2: Session tracking II

...PAS FINI tout cela .... à suivre !

UP PREVIOUS NEXT -- TIE