我想统计有多少人访问了我的网站。应该如何统计呢我记得是在SESSION里面写个公共变量什么的
具体怎么写啊?
谢谢
具体怎么写啊?
谢谢
解决方案 »
- description The requested resource (Servlet jsp is not available) is not availab
- 收藏 不显示删除回复显示所有回复显示星级回复显示得分回复 Flex如何接收java返回的对象,并和dataGrid进行绑定
- jstl c:out c:set
- SSH整合中出现NullPointerException,大虾赐教
- 使用Jbuilder开发Webmodule的时候,需要在JSP页面中调用Javabean(不是EJB),如何配制Javabean的环境才能正确的查找到?
- 这是什么错误,请高手指点
- 请问如何用标签显示request的attribute?
- spring jar包官网地址
- 利用servlet给手机发送消息 此方法可以实现么
- springmvc+mybatis+mysql 中文乱码问题
- java web和客户端通讯的问题,求高手帮忙解惑!
- org.springframework.beans.factory.BeanCreationException: 急啊
<%!
synchronized void countPeople()
{
ServletContext application=getServletContext();
Integer number=(Integer)application.getAttribute("Count");
if(number==null){
number=new Integer(1);
application.setAttribute("Count",number);
}else{
number=new Integer(number.intValue()+1);
application.setAttribute("Count",number);
}} %>
<%
if(session.isNew())
{countPeople();
Integer myNumber=(Integer)application.getAttribute("Count");
session.setAttribute("MyCount",myNumber);
}
%><h3 align="center">您是第<font color="red"><%
int a;
if(session.getAttribute("MyCount")!=null)
{a=((Integer)session.getAttribute("MyCount")).intValue();}
else
{a=1;}
%><%=a %></font>个访问本站的客户。</h3>