useBean的问题
Counter.java
package usebean;
public class Counter
{
int count=0;
public Counter()
{
}
public int getCount()
{
count++;
return this.count ;
}
public void setCount(int count)
{
this.count =count;
}
}
counter.jsp
<%@page contentType="text/html;charset=gb2312"%>
<html>
<head><title>counter</title></head>
<body>
<jsp:useBean id="counter1" scope="application" class="usebean.Counter"/>
<%=counter1.getCount() %>
</body>
</html>
在weblogic下执行counter.jsp时出错:
Parsing of JSP File '/ppp/counter.jsp' failed:
--------------------------------------------------------------------------------
/ppp/counter.jsp(5): class 'usebean.Counter' could not be loaded
probably occurred due to an error in /ppp/counter.jsp line 4:
<jsp:useBean id="counter1" scope="application" class="usebean.Counter"/>
--------------------------------------------------------------------------------