JSP问题,我找不出错误
Compute.html
<html>
<body>
<form action="Compute.jsp" method="post">
<p>选择要做的算法
<input type=radio name="compute" value="divide1" checked>除法
  
<input type=radio name="compute" value="multiply1">乘法
</p>
<tr>
<td>
被除数(被乘数)<input type=text name="value1" >
除数(乘数)<input type=text name="value2" >
</td>
</tr>
<tr>
<td align=center>
<input type=submit value="计算结果">
</td>
</tr>
</table>
</form>
</body></html>
Compute.jsp
<%@page contentType="text/html;charset=gb2312" language="java" %>
<html><body>
<%@ include file="Compute.html" %>
<% String value1=request.getParameter("value1");
String value2=request.getParameter("value2");
%>
<% if("divide1".equals(request.getParameter("compute"))){ %>
<jsp: include page="Divide.jsp" flush="true" >
<jsp: param name="v1" value="<%=value1 %>" />
<jsp: param name="v2" value="<%=value2 %>" />
</jsp:include>
<% }else{ %>
<%@ include file="multiply.jsp" %>
<% } %>
</body></html>
Divide.jsp
<%@page contentType="text/html;charset=gb2312" language="java" %>
<html><body>
<%
try{
float a1 = Float.parseFloat(request.getParameter("v1"));
float a2 = Float.parseFloat(request.getParameter("v2"));
double d = a1/a2;
%>
<%=d%>
<%
}catch(Exception e){out.println("不合法的除数与被除数" );}
%>
</body></html>
multiply.jsp
<%@page contentType="text/html;charset=gb2312" language="java" %>
<html><body>
<%
try{
float a1 = Float.parseFloat(request.getParameter("value1"));
float a2 = Float.parseFloat(request.getParameter("value2"));
double m = a1*a2;
%>
<% out.println(a1+"*"+a2+"="+m);%>
<%
}catch(Exception e){
out.println("不合法的乘数与被乘数");
}
%>
------解决方案--------------------multiply.jsp
<%@page contentType="text/html;charset=gb2312" language="java" %>
<html><body>
<%
try{
float a1 = Float.parseFloat(
request.getParameter("value1"));
float a2 = Float.parseFloat(
request.getParameter("value2"));
double m = a1*a2;
%>
<% out.println(a1+"*"+a2+"="+m);%>
<%
}catch(Exception e){
out.println("不合法的乘数与被乘数");
}
%>
可以得到值吗?
另外你把报的错误贴出来啊