You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eddie Kawas <ed...@gmail.com> on 2005/01/20 19:03:23 UTC

how to create a custom servlet for server 404 errors

 

Hi,

 

I am trying to create a default server 404 error servlet that gets
served every time someone tries to access a page that is not present
for all web apps. I have added:

 

 

 

   <error-page>

 

        <error-code>404</error-code>

 

        <location>/DefaultTomcatPages/Error404</location>

 

    </error-page>

 

 

 

To the bottom of the /conf/web.xml file. The servlet works when I
access it using localhost:8080/DefaultTomcatPages/Error404

 

 

 

I realize I may need to configure server.xml as well, but I am unsure
of how to proceed.

 

Thanks,

 

Eddie