tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ricky Leung" <ri...@booksense.com>
Subject RE: Custom 404 Page
Date Wed, 27 Feb 2002 23:31:26 GMT
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:c-brian.owens@wcom.com]
Sent: Wednesday, February 27, 2002 4:45 PM
To: tomcat-user@jakarta.apache.org
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:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>



--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message