You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Henri Gomez <hg...@apache.org> on 2003/01/08 17:20:40 UTC

FYI: [Fwd: documentation error]

I wished to point out that in the jakarta/tomcat documentation, there is an
error.  

Under server configuration reference, Host
(webapps\tomcat-docs\config\host.html), it shows, under the section heading
request filters, an example of using the valve xml tag for the server.xml
configuration file.

<Host name="localhost" ...>
  ...
  <Valve className="org.apache.catalina.valves.RemoteHostValve"
         allow="*.mycompany.com,www.yourcompany.com"/>
  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
         deny="192.168.1.*"/>
  ...
</Host>

The problem is in the regular expression, it should read:

<Host name="localhost" ...>
  ...
  <Valve className="org.apache.catalina.valves.RemoteHostValve"
         allow="\w*.mycompany.com,www.yourcompany.com"/>
  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
         deny="192.168.1.\d*"/>
  ...
</Host>

Without the '\w' and the '\d' the server will not start, as the regular
expression engine will throw an exception.

Excellent job, else, guys!  Thanks,

Shawn Stoffer
 <<Stoffer, Shawn D.vcf>>