Here is my program files. when i divide 20 by 5 i get answer 4 Okay. Correct! But when i divide 20 by 0 i doesn't get Aspected Output. Instead i get Page cannot be displayed error HTML 500 Internal server error.
Using NetBeans 8.2 and Internet Explorer. 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.print("division of numbers is: "+c);
%>
error.jsp
<%@page isErrorPage="true" %>
<html>
<body>
An unexpected exception was encountered.
The admin monkeys are looking into the issue.
<br><br>
Exception is : <%= exception %>
</body>
</html>
Problem was with Internet Explorer with chrome it worked.