<!-- Collection of code snippets by Arne Vajhøj -->
<!-- (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) -->
<%
if(session.getAttribute("V") == null) {
    session.setAttribute("V", 1);
} else {
    session.setAttribute("V", (Integer)session.getAttribute("V") + 1);
}
if(application.getAttribute("V") == null) {
    application.setAttribute("V", 1);
} else {
    application.setAttribute("V", (Integer)application.getAttribute("V") + 1);
}
%>
Session = <%=session.getAttribute("V")%>
<br>
Application = <%=application.getAttribute("V")%>
<br>
Session = ${sessionScope['V']}
<br>
Application = ${applicationScope['V']}
