ContactUs :

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

Why ExceptionHandling ?

If there is a error, to display the error page we need to implement the rd.forward() logic in the servlet, because req/res objects are available. If there is SQLException, we need to catch it in the DAO class then in the catch block we need to implement the forward logic. Its not possible to implement the logic because req/res objects will not be available. To implement the forward logic in the DAO class we required req/res and we should not pass the req/res objects to the DAO. In any project we should catch the SQLException in the DAO class and rethrow the user-defined exception to the servlet class and handle the user-defined exception in the servlet and forward to the error page, then it will display proper error page.**
Related Posts Plugin for WordPress, Blogger...
Flag Counter