jsp文件在root/MyWorks/下;tomcat5.5
<%@ page contentType= "text/html;charset=gb2312 "%>
<%@ page import= "Circle "%>
<html>
<body> <font size=4>
<jsp:useBean id= "girl " class= "Circle " scope= "page ">
</jsp:useBean>
<%//设置圆的半径
girl.setRadius(100);
%>
<p> 圆的半径是:
<%=girl.getRadius()%>
<p> 圆的周长是:
<%=girl.circleLength()%>
<p> 圆的面积是:
<%=girl.circleArea()%>
</body>
</html>
------解决方案--------------------
root/MyWorks/WEB-INF/classes/
------解决方案--------------------
你改过jsp服务器的根目录吗?默认目录好像是%Tomcat x.x%/webapps/ROOT/
如果你的路径是webapps/root/MyWorks/那么class应该放在webapps/root/WEB-INF/classes/