<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>? <head>? ? <base href="<%=basePath%>">? ??? ? <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> ? ? <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/html" href="styles.css"> -->? </head>??? <body>? ? ? ? ? ? ? ?半徑為<%=r %>的圓的面積為:<br>? ? ? ? ? ? ? ? ? ? ?<% =area(r)%>? ? ? ? ? ? ? ? ? ? ?<%!? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?double area(double r){? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?return r*r*pi;? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? %>? ? ? ? ? ? ? ? ? ? ? ?<%!? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? double r=10;? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?final double ? pi=3.14;? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?%>? </body></html>編譯運(yùn)行后顯示的是 ?jsp文件無法編譯Java類 ?是什么原因謝謝解答?。?!
添加回答
舉報(bào)
0/150
提交
取消