jsp记录页面访问次数

    <%
    if(application.getAttribute("count")==null){
     application.setAttribute("count",0);
    }
    %>
    <%
     int count=Integer.parseInt(application.getAttribute("count").toString());
     count++;
     application.setAttribute("count", count);
     %>
    
访问次数:<%=application.getAttribute("count") %>

你可能感兴趣的:(jsp记录页面访问次数)