This works: 8<8<8<8<8<8<8< web.xml 8<8<8<8<8< <?xml version = '1.0' encoding = 'UTF-8'?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
<error-page> <error-code>404</error-code> <location>/404.jsp</location> </error-page> </web-app> 8<8<8<8<8<8< 404.jsp 8<8<8<8<8<8< <!doctype html public "-//w3c//dtd html 4.0 transitional//en" "http://www.w3.org/TR/REC-html40/strict.dtd"> <%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %> <%@ page import="java.util.Date" %> <html> <head> <title>Page Not Found</title> </head> <body style="font-family: Arial"> <h1>Page Not Found (404)</h1> <p/> The page you requested (<%=request.getAttribute("javax.servlet.forward.servlet_path")%>) was not found. </body> </html> Tim -----Original Message----- From: Fredrik Andersson [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 8:32 AM To: Tomcat Users List Subject: Re: replace tomcat Status report Hi there I belive you should be able to edit you web.xml with info to overwrite the default error pages. Never done it myself but it´s a hint. =) Good luck Den 6/14/2006, skrev "Dean Hiller" <[EMAIL PROTECTED]>: >I guess I should add that my partner did add this stuff to our >ROOT.war(we deleted the ROOT directory) but it doesn't seem to work... > > <error-page> > <exception-type>java.lang.Throwable</exception-type> > <location>/error.jspx</location> > </error-page> > <error-page> > <error-code>500</error-code> > <location>/error.jspx</location> > </error-page> > <error-page> > <error-code>404</error-code> > <location>/error.jspx</location> > </error-page> > >thanks, >dean > >Dean Hiller wrote: > >> I finally gave up in searching for this(and my partner is soon to give >> up to) so I decided to ask here. >> >> When I go to http://localhost:8080/NoPage.jsf, tomcat tells me the >> tomcat version and everything so I can google for tomcat hacks on that >> version. I would much prefer to hide the version number with my own >> "Resource not found" page. Is this possible? >> >> for exceptions my app runs into, I am just using a filter to redirect >> to a page that doesn't show a tomcat version too. >> >> thanks for any info, >> dean >> >> >> --------------------------------------------------------------------- >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > >--------------------------------------------------------------------- >To start a new topic, e-mail: users@tomcat.apache.org >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]