一个简单的计数器中的问题?
我源文件为:
init.jsp
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<BODY BGCOLOR="#FFFFFF">
<%
//统计在线人数
application.setAttribute("counter",new Integer(0));
out.println(application.getAttribute("counter"));
//记录在线人名
application.setAttribute("onlineName",new String(""));
out.println(application.getAttribute("onlineName"));
%>
</BODY>
</HTML>
count.jsp
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</head>
<BODY BGCOLOR="#FFFFFF" onUnload="javascript:cancel();">
<%
Integer i=(Integer)application.getAttribute("counter");
String name=(String)application.getAttribute("onlineName");
//StringBuffer total=new StringBuffer(name);
%>
<font color="blue">
<%out.println((String)Session.getAttribute("username"));%>您好:
</font>
<br><font color="blue">
当前在线人数:<%=i%>
</font>
<br>
<font color="red">
在线人总名册:<%out.println(name);%>
</font>
</BODY>
</HTML>
运时出现下列错误:
An error occurred at line: 14 in the jsp file: /count.jsp
Generated servlet error:
D:\Apache Tomcat 4.0\work\Standalone\localhost\_\count$jsp.java:68: Undefined variable or class name: Session
out.println((String)Session.getAttribute("username"));
这是为什么,怎样改?
急急....