title: Handling Exception when calling forward on a RequestDispatcher
body: <p>Here is my code.</p>
  
  <pre><code>try {
      RequestDispatcher d = request
              .getRequestDispatcher("messages/error.jsp");
      request.setAttribute("message", "Error Occurred !!!");
      d.forward(request, response);
  } catch (ServletException se) {
      se.printStackTrace();
  } catch (IOException ioe) {
      ioe.printStackTrace();
  }
  </code></pre>
  
  <p>I need to know how to handle <code>ServletException</code> and <code>IOException</code> in given code. I wish to redirect user to a error page and tell user to error occurred when getting above exceptions.</p>
  
  <p>How could i do this ?</p>