%@ page language="java" contentType="text/html; charset=windows-1255"
pageEncoding="windows-1255"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
Success
<%
session.setMaxInactiveInterval(2);
if(application.getAttribute("counter") == null || (Integer)application.getAttribute("counter") == 0) {
application.setAttribute("counter", 1);
}
if(session.isNew() == true){
synchronized(page){
Integer counter = (Integer) application.getAttribute("counter");
counter += 1;
application.setAttribute("counter", counter);
}
}
%>
Successfully logged in as <%=session.getAttribute("user")%>
You are the visitor number <%=application.getAttribute("counter")%>