标签:count import int java intval ssi 访问 enc htm
<%@page language="java" import="java.util.*"pageEncoding=UTF-8%>
<html>
<head><title>统计网站访问人数及其当前在线人数</title></head>
<body>
<%! Integer yourNumber=new Integer(0);%>
<% if(session.isNew()){
integer number=(Integer)application.getAttribute("count");
if(number==null)
{
number=new Interger(1);
}
else
{number =new Integer(number.intValue()+1);}
application.setAttribute("Count",number);
yourNumber=(Integer)application.getAttribute("Count");
}%>
欢迎访问本站,您是第<%=yourNumber%>个访问用户.
</body>
</html>
标签:count import int java intval ssi 访问 enc htm
原文地址:http://www.cnblogs.com/jgrs/p/7652442.html