how to build server level custom error page in tomcat?

You can add this to the $CATALINA_HOME/conf/web.xml

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

And add a webapp that has the page and will answer to the URL under <location>

Leave a Comment