`
yaozuodaoforfly
  • 浏览: 119028 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

RegexPatternMatcher

 
阅读更多
public class RegexPatternMatcher
extends Object
implements 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" />
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics