Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat warning: "Setting property 'showServerInfo' to 'false' did not find a matching property"

Tags:

tomcat

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?

like image 276
Mark Avatar asked Oct 19 '22 16:10

Mark


1 Answers

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

like image 87
Mark Avatar answered Jan 04 '23 05:01

Mark