<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"> <web-app> ... after <session-config>
<error-page> <error-code>404</error-code> <location>/servlet/package.ErrorHandlerServlet?code=404</location> </error-page> before <tablib> ... </web-app> Make sure you use "web-app_2_3.dtd" at the top. I'm afraid that if you use "web-app_2_2.dtd" it will not work. Steve "VEDRE, RANAPRATAP REDDY" wrote: > I have tried to use <error-page> directive in web.xml for 404 http error > and direct to a custom error page. But could not get it to work. > > i know for tomcat 4 the error-page directive has to before the teg lib > descriptors. but still does not work. > > Can anybody please give the syntax and placement in web.xml for catching > 404 error. > > -Thanks. > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>