2014-04-02 31 views
4

不断在struts2中,是否可以使用可选的patternMapping与变量?

<constant name="struts.enable.SlashesInActionNames" value="true"/> 
<constant name="struts.mapper.alwaysSelectFullNamespace" value="false"/> 
<constant name="struts.patternMatcher" value="regex" /> 

当前版本

<action name="list/{pageNo}" method="list" class="xx.GroupAction"> 
    <result type="dispatcher">/WEB-INF/jsp/sys/group/list.jsp</result> 
</action> 
<action name="list"> 
    <result type="redirectAction">list/</result> 
</action> 

这就是我想要

<action name="list(/{pageNo})?" method="list" class="xx.GroupAction"> 
    <result type="dispatcher">/WEB-INF/jsp/sys/group/list.jsp</result> 
</action> 

wildcard-mappings

它可以达到我想要介绍什么?

回答

0

编号

您提供的文档链接解释了可用选项。可选匹配和括号不是通配符映射的功能。

相关问题