Spring & Tomcat – custom errors

In spending a few hours on trying to get the error-page tag in tomcat’s web.xml working, i’ve found a better way to do it – one which uses spring to take on exception handling rather than Tomcat itself – something which also lets spring give the error-page visibility on other view-objects and business-rules.

Simple enough to implement and works wonderfully! 🙂


<property name="exceptionMappings">
<entry key="project.exception.RecordNotFoundException" value="recordNotFoundException" />


Leave a Reply