public class RegexPatternMatcher extends Object implements PatternMatcher<RegexPatternMatcherExpression>
<action name="/{bio:.+}/test/{name}" class="org.apache.struts2.showcase.UITagExample"> <result>/tags/ui/example.jsp</result> </action>For this to work it is important to set the following:
<constant name="struts.enable.SlashesInActionNames" value="true"/> <constant name="struts.mapper.alwaysSelectFullNamespace" value="false"/> <constant name="struts.patternMatcher" value="regex" />
Constructor and Description |
---|
RegexPatternMatcher() |
Modifier and Type | Method and Description |
---|---|
RegexPatternMatcherExpression |
compilePattern(String data) |
boolean |
isLiteral(String pattern) |
boolean |
match(Map<String,String> map,
String data,
RegexPatternMatcherExpression expr) |
public RegexPatternMatcherExpression compilePattern(String data)
compilePattern
in interface PatternMatcher<RegexPatternMatcherExpression>
public boolean isLiteral(String pattern)
isLiteral
in interface PatternMatcher<RegexPatternMatcherExpression>
public boolean match(Map<String,String> map, String data, RegexPatternMatcherExpression expr)
match
in interface PatternMatcher<RegexPatternMatcherExpression>
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.