代码如下: Integer count = (Integer) application.getAttribute("count"); if( count==null || count==0 ){ count = 1; }else{ count=count+1; } application.setAttribute("count", (int)count); %> <p>页面访问量为: <%= count%></p>