Jsp内置对象application之统计浏览网页的次数

<%
Object obj = application.getAttribute("count");
if(obj !=null){
Integer sum = (Integer)obj;
sum++;
application.setAttribute("count",sum);

}else{
application.setAttribute("count",1);
}
%>
<%=application.getAttribute("count")%>

 

posted @ 2018-08-13 16:14  胜过这首歌  阅读(232)  评论(0编辑  收藏  举报
AmazingCounters.com