📄 config.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<% int org=0;
int count=0;
try
{
org=Integer.parseInt(config.getInitParameter("counter"));
}
catch(Exception e)
{
out.println("org:"+e);
}
try
{
count=Integer.parseInt((application.getAttribute("config_counter").toString()));
}
catch(Exception e)
{
out.println("config_counter"+e);
}
if(count<org)count=org;
out.println("此页面已经访问了"+count+"次");
count++;
application.setAttribute("config_counter",new Integer(count));
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -