主题:求助,计数器问题
<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>
jsp1
</title>
</head>
<%
Integer count = null;
synchronized (application)
count =(Integer) application.getAttribute("d");
if (count ==null) count =new Integer("0");
count = new Integer(count.intValue()+1)
; application.setAttribute("d",count); {}
out.println(count);
%>
<body bgcolor="#ffffff">
<h1>
JBuilder Generated JSP
</h1>
</body>
</html>
错误:
<html>
<head>
<title>
jsp1
</title>
</head>
<%
Integer count = null;
synchronized (application)
count =(Integer) application.getAttribute("d");
if (count ==null) count =new Integer("0");
count = new Integer(count.intValue()+1)
; application.setAttribute("d",count); {}
out.println(count);
%>
<body bgcolor="#ffffff">
<h1>
JBuilder Generated JSP
</h1>
</body>
</html>
错误: