Circle.java
import java.io.*;
public class Circle
{int radius ;
public Circle()
{radius=1;
}
public int getRadius()
{return radius;
}
public void setRadius(int newRadius)
{radius=newRadius;
}
public double circleArea()
{return Math.PI*radius*radius;
}
public double circleLength()
{return 2.0*Math.PI*radius;
}
}
useBeans.jsp
<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="Circle" %>
<HTML>
<BODY begcolor=cyan><Font sized=1>
<jsp:useBean id="girl" class="circle" scope="page" >
</jsp:useBean>
<%
girl.setRadius(100);
%>
<p>圆的半径
<%=girl.getRadius() %>
<p>圆的周长
<%=girl.circleLength() %>
<p>圆的面积
<%=girl.circleArea() %>
</BODY>
</HTML>
我的useBeans.jsp放在C:\Tomcat 5.5\webapps\ROOT里
我的Circle.class放在C:\Tomcat 5.5\classes
帮我看看啊,哪里错了啊