About Question enthuware.jwpv6.2.798 :
Posted: Sat May 14, 2016 7:20 pm
For option 1, I can demo even though it is not the best way to handle exception :
Code: Select all
public class MyServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
try{
throw new IOException();
}
catch (IOException e){
request.getRequestDispatcher("errorPage.jsp").forward(request, response);
}
}
}