I\'d like to direct all errors to my Errorsevlet without specifying all the codes explicitly. Is there any way to do like that?
If you can upgrade, since Servlet 3.0 it's possible to have a generic error page for all errors, even those not caused by an exception (e.g. 404, 401, etc). Just omit the
or
altogether so that you only have a
.
/errorServlet
Note that I replaced the URL to avoid the use of Tomcat's builtin and deprecated InvokerServlet
.