以下代码仅供参考。
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%int i =1;%>
<%Object count = application.getAttribute("count");%>
<%if(count ==null)
{application.setAttribute("count",i);%>
<%}else{application.setAttribute
("count",(Integer)(count)+1);}
%>
次数:<%=count%>