org.apache.struts2.util
类 RegexPatternMatcher

java.lang.Object
  继承者 org.apache.struts2.util.RegexPatternMatcher
所有已实现的接口:
com.opensymphony.xwork2.util.PatternMatcher<RegexPatternMatcherExpression>

public class RegexPatternMatcher
extends Object
implements com.opensymphony.xwork2.util.PatternMatcher<RegexPatternMatcherExpression>

Allows regular expressions to be used in action names. The regular expressions can be in the form {FIELD_NAME} or {FIELD_NAME:REGULAR_EXPRESSION}. For example:

  <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" />
 


构造方法摘要
RegexPatternMatcher()
           
 
方法摘要
 RegexPatternMatcherExpression compilePattern(String data)
           
 boolean isLiteral(String pattern)
           
 boolean match(Map<String,String> map, String data, RegexPatternMatcherExpression expr)
           
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

RegexPatternMatcher

public RegexPatternMatcher()
方法详细信息

compilePattern

public RegexPatternMatcherExpression compilePattern(String data)
指定者:
接口 com.opensymphony.xwork2.util.PatternMatcher<RegexPatternMatcherExpression> 中的 compilePattern

isLiteral

public boolean isLiteral(String pattern)
指定者:
接口 com.opensymphony.xwork2.util.PatternMatcher<RegexPatternMatcherExpression> 中的 isLiteral

match

public boolean match(Map<String,String> map,
                     String data,
                     RegexPatternMatcherExpression expr)
指定者:
接口 com.opensymphony.xwork2.util.PatternMatcher<RegexPatternMatcherExpression> 中的 match