config.jsp
来自「一个超市管理系统,提供一些基本简单的操作,JSP+APACHE+ORCALE实现」· JSP 代码 · 共 36 行
JSP
36 行
<%@ 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 + =
减小字号Ctrl + -
显示快捷键?