How to catch all error-codes at once

How can i catch all error-codes at once? i tried * but it didnt work.

<error-page>
  <error-code>javax.servlet.error.status_code</error-code>  
  <location>/default_error_page.html</location>
</error-page>

Answer

There is no way to do that according to the web.xml XSD. You’ll have to specify each error code separately.

Leave a Reply

Your email address will not be published. Required fields are marked *