I'm trying to change my webapp so that it doesn't provide any details about the server type or version when an error is generated, as described in this page. So in the META-INF/context.xml file of my webapp I have added an ErrorReportValve like this:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
...
<Valve className="org.apache.catalina.valves.ErrorReportValve"
showReport="false"
showServerInfo="false" />
...
</Host>
But when I start tomcat I get this error message:
Feb 27, 2015 11:48:26 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Context/Valve} Setting property 'showReport' to 'false' did not find a matching property.
Feb 27, 2015 11:48:26 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Context/Valve} Setting property 'showServerInfo' to 'false' did not find a matching property.
(I am running tomcat 7.0.52 on Ubuntu 14.04.2 LTS)
Can anyone suggest why the ErrorReportValve seems to be missing properties?
The problem is my version of tomcat is too old - the properties weren't included until version 7.0.54:
http://tomcat.apache.org/tomcat-7.0-doc/changelog.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With