title: How to configure spring HandlerExceptionResolver to handle NullPointerException thrown in jsp?
body: <p>From a jsp is thrown a NullPointerException for example using  <code>&lt;% null.toString(); %&gt;</code></p>
  
  <p>This exception is not handled by the HandlerExceptionResolver, but thrown to the web container(tomcat) and converted into a <code>code 500 error</code>.</p>
  
  <p>How can I configure spring to get that error in my HandlerExceptionResolver ?</p>
  
  <p>Details:</p>
  
  <ul>
  <li>Spring can be configured to handle exceptions thrown inside Controllers, but not exceptions thrown by view.</li>
  <li>Of course i can resolve the NullPointerException, but i want to design a solution that will gracefully resolve any possible problem on the web application in order to display a user friendly message to the user.</li>
  </ul>