If you are talking about the error-page of the Servlets specification, up to version 2.5, within the web-app tag (the main tag of the web.xml file that sits within WEB-INF) there is the possibility that you have one or more error-page tags, e.g.:
<!-- não encontrado -->
<error-page>
<error-code>404</error-code>
<location>/404.jsp</location>
</error-page>
<!-- erro interno -->
<error-page>
<error-code>500</error-code>
<location>/500.jsp</location>
</error-page>
If it is from Servlet 3.0, you can generalize by doing:
<!-- qualquer erro -->
<error-page>
<location>/minhaPaginaDeErro.jsp</location>
</error-page>
Taking advantage that we are talking about error pages, you can have access to special objects (you can even see the stacktrace in case of error 500 for example). For more details, see this link.