Error pages

You can customize error and exception reports that are sent to clients by creating error pages. When the servlet engine detects an error or catches an exception thrown by a servlet, it searches for a corresponding error page to handle the response. You can declare error pages for a Web application, or at the server level.

This example illustrates how to declare an error page for a Web application in the deployment descriptor:

<error-page>
  <error-code>404</error-code>
  <location>/etc/404.html</location>
</error-page>

The location is the path relative to the Web application’s context root. For example, /etc/404.html corresponds to this file in your EAServer installation directory, where web-app is the name of the Web application:

Repository/WebApplication/web-app/etc/404.html

For information about how to use EAServer Manager to set up an error page for a Web application, see “Error pages”.

To set up server-level error pages, see com.sybase.jaguar.server.servlet.error-page on page 553, in the EAServer System Administration Guide.