title: Display servlet errors in JSP using JSTL or EL
body: <p>I want to display error messages e.g SQLException errors in the jsp page that the servlet has redirected to. I am new in java and JSP but I have managed to get basic things like saving data using a servlet to a database working. Below is my code for catching errors encountered </p>
  
  <pre><code> catch(SQLException e){
           out.println("SQL Error encountered "+e.getMessage()); 
  </code></pre>
  
  <p>How can I catch this error into a jsp page that has been redirected to by the servlet using jstl or Expression Language? E.g if an admin submits a duplicate email address from a page called createuser.jsp, the error should be displayed in creatuser.jsp</p>