session计数器:
<%
Integer counter=(Integer)session.getAttribute("counter");
if(counter==null){
counter=1;
}else{
counter++;
}
session.setAttribute("counter", counter);
String realpath=application.getRealPath("/");
String counter = session.getId();</span>
%>
当前页面初访问的次数:<%=counter %><br>
SessionID:<%=counter %>
application计数器:
<%
Integer counter=(Integer)application.getAttribute("counter");
if(counter==null){
counter=1;
}else{
counter++;
}
application.setAttribute("counter", counter);
String realpath = application.getRealPath("/");
%>
当前页面初访问的次数:<%=counter %>