tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Mazza <grm7...@verizon.net>
Subject Re: error-page for nonexistent context
Date Sat, 25 Feb 2006 03:12:07 GMT
Paul Singleton wrote:

> (I am required to anonymiee a Tomcat 5.5 server from hackers
> trying to discover its version etc.)
> 
> If I put this in conf/web.xml
> 
> <error-page>
>   <error-code>404</error-code>
>   <location>/anon_error.jsp</location>
> </error-page>
> 
> *and* put an anon_error.jsp in every web app, then I can
> replace the built-in error page.
> 
> But where will Tomcat look for /anon_error.jsp when a
> (page within a) nonexistent context is requested?

e.g., http://localhost:8080/skldjfha ?

Then I think you would want to alter the conf/web.xml for the 
DefaultServlet[1], placing the <error-page/> element you have defined 
above in that file.

[1] http://tomcat.apache.org/tomcat-5.5-doc/default-servlet.html

Glen

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message