<%
if((Integer) application.getAttribute("AccessCount") == 0){
application.setAttribute("AccessCount", 0);
}
int count = (Integer) application.getAttribute("AccessCount");
application.setAttribute("AccessCount", count+=1);
(源码来自于茶屋teahouse)
%>