1
error.jsp文件爲什麼IDE內部瀏覽器給HTTP 500內部服務器錯誤
<body>
<%@ page isErrorPage="true"%>
<h2>Sorry, your application generating an exception</h2>
Exception is : <%=exception %>
</body>
的index.html
<form action="process.jsp">
No1 : <input type="text" name="n1"><br><br>
No2 : <input type="text" name="n2"><br><br>
<input type="submit" value="Divide">
</form>
process.jsp
<%@ page errorPage="/error.jsp" %>
<%
String num1=request.getParameter("n1");
String num2=request.getParameter("n2");
int a = Integer.parseInt(num1);
int b = Integer.parseInt(num2);
int c = a/b
out.println("Division of numbers is : "+c);
%>
當我devide任意數量由零IDE內部網頁瀏覽器給「Http 500服務器內部錯誤),當我改變網頁瀏覽器它給我正確的輸出
jrbeddard你能回答我的問題嗎 –