白送分的问题!
我想试用一下javabean,但是为什么老是包错
500 Servlet Exception
/test/helloBean.jsp:3: jsp:useBean can't find class `helloBean.helloBean'
-------------------------------------------------------------------------
Resin 2.1.9 (built Tue Apr 15 14:28:40 PDT 2003)
我把这2个文件已经放到一起了,并且也把.java编译了,可是还是不行,请指教
helloBean.java
package helloBean;
public class helloBean
{
String s;
public helloBean()
{
this.s="hello!Bean";
}
public void setString(String mystring)
{
this.s=mystring;
}
public String getString()
{
return(this.s);
}
}
helloBean.jsp
<html>
<body bgcolor="#ffffff">
<jsp:useBean id="HW" scope="request" class="helloBean.helloBean"/>
<div align="center">
<p><br>
<font size="+2">no.1 hello</font><br>
<font size="+4">
<%=HW.getString()%>
<%HW.setString("hello!word");%></font>
<br>
</p>
<p> </p>
<p><font size="+2">no.2 hello</font><br>
<font size="+4"><%=HW.getString()%></font></p>
</div>
</body>
</html>在线等你的回答!!!!