Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress Servlet Development Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

4.10 Configure Error Pages

An error-page element defines a resource to handle errors of a specific type. Each error-page element contains an error-code element and a location element. The error-code defines the HTTP error code the element handles. The location element defines the path for forwarding the request. Note that the location can be any resource reachable by the servlet container, including a file within the context, another servlet, or even a remote HTTP resource. For example, the web.xml fragment below configures the container to return the contents of the file 404.html when a servlet returns HTTP error code 404.

In a location element, the path to a file is relative to the root directory of the context. In the example above, the file 404.html must be located in the root directory of the context. The directory tree for the example above should look similar to:

As shown above, the 404.html file is in the context root directory, examples, not in the WEB-INF directory.

Previous fileTop of DocumentContentsIndex pageNext file

©2004-2007 Copyright Quovadx, Inc. All Rights Reserved.
Quovadx and Rogue Wave are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.