How to make a ErrorController, like the ErrorController in the Zend Framework for PHP, with servlets in java?
Now I have this
<servlet>
<display-name>ErrorController</display-name>
<servlet-name>ErrorController</servlet-name>
<servlet-class>project.controller.ErrorController</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ErrorController</servlet-name>
<url-pattern>/error</url-pattern>
</servlet-mapping>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error</location>
</error-page>
Is it possible to have something similar with servlets?