<%@ page contentType="text/html; charset=UTF-8" import="java.util.*" language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML >
<html>
<head>
<title>我的第一个JSP页面</title>
</head>
<body>
<%
int number=0;
synchronized(application)
{
if(application.getAttribute("times")==null)
{
number=1;
}
else
{
number=Integer.parseInt((String)application.getAttribute("times"));
number++;
}
application.setAttribute("times", Integer.toString(number));
}
%>
<table>
<tr bgcolor="lightgrey">
<td align="center">欢迎访问</td>
</tr>
<tr>
<td align="center">你是第<b><%=number%></b>位访问本网站的用户!</td>
</tr>
</table>
</body>
</html>
相关文章
- 使用宝塔面板快速搭建web网站,并内网穿透实现公网远程访问
- 织梦DedeCMS实现 三级栏目_二级栏目_一级栏目_网站名称 的效果代码
- Histats申请Counter网站计数器 - Blog透视镜
- 基于Java+SSM+Vue的旅游资源网站设计与实现【源码(完整源码请私聊)+论文+演示视频+包运行成功】
- 前端知识学习案例11-开发企业网站10-实现案例部分2
- 前端知识学习案例8-开发企业网站8-实现关于我们的部分1
- Python爬虫-第五章-1-超级鹰插件实现自动填写识别码并登录12306网站
- 基于Java jsp+servlet超市订单管理平台设计和实现
- 使用JSP Servlet和Ajax实现简单的注册页面的用户名密码验证
- 使用JSP Servlet和Ajax实现简单的注册页面的用户名密码验证