Hi Santosh
I am still getting the same old error.
Please have a look at the code once.
Given below is the code for Servlet and JSP:
BeerSelect.java
======================= import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class BeerSelect extends HttpServlet
{
public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException
{
RequestDispatcher fw=request.getRequestDispatcher("test.jsp");
fw.forward(request,response);
}
public void doGet(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException
{
doPost(request,response);
}
}
test.jsp
======================== <html>
<body>
<h1>Error
Testing Page</h1>
${1 mod 0}
</body>
</html>
error.jsp
====================== <%@ page isErrorPage='true' %>
<html>
<body>
<h1>error page123456</h1>
</body>
</html>
Code in Web.xml
======================== <error-page>
<exception-type>java.lang.RuntimeException</exception-type>
<location>/error.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/error.jsp</location>
</error-page>