refresh.jsp
<%
Integer count=(Integer)application.getAttribute("count");
<--!将count强转为Integer类型 -->
if(count==null){<--!判断count是否为空 -->
application.setAttribute("count",1);
}else{
application.setAttribute("count",count+1);}
%><--!如果count不为空 count+1 -->
<p>第<%=application.getAttribute("count")%>次访问</p>