very bad practice to return a blank page, or worse no response at all.

your 404 shouldn't contain information that is 'best kept secret' anyway.

given that you can customise the error response, you could just return a
really simple page (but bear in mind the IE error page file size
'feature').  you don't have to put much information on those pages, and
there's certainly no need to put sensitive information there, but you
*should* return a notice which describes that an error has ocurred.



Darren wrote:
> Hi,
> 
> I am looking for a way to globally change the error pages on
> java.lang.Exception (stacktrace) and 404 because they contain
> information that is best kept secret on production servers.  I realise
> you can do this on a per application basis with WEB-INF/web.xml but I'm
> looking at this more from the side of a system administrator that would
> not really want to be altering per application configurations.
> 
> You can achieve blank pages by adding into CATALINA_HOME/conf/web.xml
> 
>  <error-page>
>    <error-code>404</error-code>
>    <location>/non_existent_file.jsp</location>
>  </error-page>
> 
>  <error-page>
>    <exception-type>java.lang.Exception</exception-type>
>    <location>/non_existent_file.jsp</location>
>  </error-page>
> 
> This only works (or technically fails) because non_existent_file.jsp
> does not exist in each web application, but it does prevent the
> problem.  Any suggestions for a better solution?
> 
> Thanks,
> Darren
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to