在Tomcat 5.5下能运行 但在Jbuilder 2005 下某一工程出现错误 两个数相加
<html> <head> <title>ASP Quest.htm</title> </head> <body bgcolor="#FFFFFF"> <form method="POST" action="Answer.jsp"> <p>请输入相加的两个整数,然后按"提交":</p> <p><input type="text" name="num1" size="5">+ <input type="text" name="num2" size="5"></p> <p><input type="submit" value="提 交" name="B1"></p> </form> </body> </html>
Answer.jsp
<%@ page import="java.lang.*"%> <html> <head> <title> Answer.jsp</title> </head> <body bgcolor="#FFFFFF"> <%! Integer n1,n2; int sum; %> <% n1=new Integer(request.getParameter("num1")); n2=new Integer(request.getParameter("num2")); sum=n1.intValue()+n2.intValue(); %> <p> <%=n1%>+<%=n2%>=<%=sum%> </p> </body> </html> 提交后出现如下错误
Help viewer error URL:
Submit operation requires running web serverThe most likely cause of this problem is trying to submit (POST) a form in a file (like an HTML, SHTML, or JSP file); but because the file is being read from the disk -- instead of from a running web server -- the submit is invalid.Instead of clicking the Submit button from the View page of the document, right-click the file in the project view and choose Web Run to display the file in the <strong>Web View</str
请指教