网页计数器源码
来源:互联网 发布:知乎不能搜索 编辑:程序博客网 时间:2024/04/28 19:31
<%@ page language="java" pageEncoding="gb2312" %>
<html>
<head>
</head>
<body>
<%!
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);
}
%>
<P><P>
<%int a =((Integer)session.getAttribute("MyCount")).intValue(); %>
您是第<%=a%>访问本站的客户
</body>
</html>
<html>
<head>
</head>
<body>
<%!
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);
}
%>
<P><P>
<%int a =((Integer)session.getAttribute("MyCount")).intValue(); %>
您是第<%=a%>访问本站的客户
</body>
</html>
- 网页计数器源码
- 网页计数器
- 网页计数器
- 网页计数器
- 网页计数器
- 网页计数器的原理
- PHP网页计数器
- C#网页计数器
- ASP网页计数器源代码
- 网页计数器代码
- 网页计数器---代码
- jsp 网页计数器代码
- servlet 网页计数器代码
- jsp网页计数器
- 网页计数器---代码
- 网页访问计数器
- JSP网页计数器
- html img hr 网页计数器
- 数据库名、实例名和ORACLE_SID的区别
- 代理模式的实现 权限控制
- 有点迷茫的第五天
- 如何从pb8升级到pb9!
- Web项目 + Flex项目分开建立实例
- 网页计数器源码
- 中国程序员
- Windows自启动程序十大藏身之所(转自CSDN)
- axis2中传递数组
- Visual C++编译器常用选项设置
- sharepoint开发模式
- Windows 注册表(NT4兼容格式)
- STL 1: GP(泛型编程)及STL的由来
- About Search & DP