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>
<%@ 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>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货