Shared Hosting

Shared hosting accounts can set the custom error pages for each domain in the members section here.

Dedicated Servers

Apache 2.2 documentation on error pages can be found here.

Apache 2.4 documentation on error pages can be found here


Error pages are defined in $CATALINA_HOME/conf/web.xml . If you have a multi instance install this can also be set in $CATALINA_BASE/conf/web.xml. Error pages can also be set on a an application level.

Tomcat versions before Tomcat 7 need to define a page for each response code like follows.

    <!-- Missing login -->
    <!-- Forbidden directory listing -->
    <!-- Missing resource -->
    <!-- Uncaught exception -->
    <!-- Unsupported servlet method -->

Starting with Tomcat 7 (Servlet 3.0) you can specify a catch-all error if desired.


CategoryHtmlProgramming CategoryJava

HtmlProgramming/how-can-i-setup-custom-error-pages (last edited 2015-08-23 18:03:49 by wilhelms)