Tuesday, January 5, 2010



JSP page Counter



JSP page Counter


<%


Integer applicationCount = (Integer)application.getAttribute("applicationCount");
if (applicationCount == null) {
applicationCount = new Integer(1);
} else {
applicationCount= new Integer(applicationCount.intValue() + 1);
}

application.setAttribute("applicationCount", applicationCount);
%>




Visitors to this page so far <%=applicationCount%> (visitor).


Followers