On Tue, Oct 4, 2011 at 22:50, André Warnier <[email protected]> wrote:
[...]
>
> So my question is : which of Matcher or Pattern is really used in the
> Valve's code ?
>
You use a Matcher to match. A Pattern is only the compiled form of a regex:
final String re = "^";
final Pattern p = Pattern.compile(re);
final Matcher m = p.matcher("myinput");
if (m.matches())
// etc
So, the fact that Matcher instances are not thread safe is not really
the problem.
[...]
>
> - or the documentation should be amended to indicate that the expression
> provided for allow and deny is already automatically anchored at the
> beginning and end of the string.
Agreed. The Tomcat documentation also suffered the same problem (wrt
regex usage in its <regex-mapper> IIRC) and I've had the doc fixed :p
--
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
[email protected]
40 avenue Raymond Poincaré
75116 Paris
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]