Re: RemoteAddrValve syntax

2009-04-05 Thread André Warnier
Jonathan Mast wrote: How do I specify wildcards in the RemoteAddrValue declaration? The Tomcat docs says it uses the java.util.regex package, so i wrote a test case like this: String patternStr = 192.168.*.*; String searchStr = 192.168.1.2; Pattern p =

RE: RemoteAddrValve syntax

2009-04-05 Thread Caldarale, Charles R
From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] Subject: RemoteAddrValve syntax The Tomcat docs says it uses the java.util.regex package But you apparently didn't read the doc for java.util.regex, which is not anything like the wildcards you tried to use:

Re: RemoteAddrValve syntax

2009-04-05 Thread André Warnier
André Warnier wrote: [...] To match any address starting with 192.168., use Valve className=org.apache.catalina.valves.RemoteAddrValve allow=192\.168\..*/ or (if you want to be really finicky about it) Valve className=org.apache.catalina.valves.RemoteAddrValve

Re: RemoteAddrValve syntax

2009-04-05 Thread Jonathan Mast
I looked at the javadocs for the RemoteAddrValve and they provided no further clarity on the syntax issue. You're right, my test case mistakenly returned a false positive, .* could match anything its true and their is no common sense wildcard in the Java Regex package. I looked at the javadoc