assuming you have tomcat4 and you integrated with apache correctly and
apache send the request to tomcat because it matched the context path that
you specified, you can edit your webapp's web.xml and add the following.

    <error-page>
        <error-code>404</error-code>
        <location>/error/er404.jsp</location>
    </error-page>

but you will need to put it in the correct place, look at the dtd for where
to place it under.

-----Original Message-----
From: Brian Owens [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 4:45 PM
To: [EMAIL PROTECTED]
Subject: Custom 404 Page


How do I set an ErrorDocument-like directive in Tomcat?  I have a custom 404
page setup in my Apache httpd.conf file, but when users enter a URL for a
file not on my website they get the standard Apache-Tomcat 404 page.  For
example, instead of going to /index.html (which is a valid file), I type
/ind (which is not a valid file).  I don't think this is the same as the
welcome file since I think that only refers to no filename being supplied.
In my case an invalid filename is supplied.  I'm running Apache 1.3.20 and
Tomcat 4.0.2.

Thanks,
Brian



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to