当使用 structs2.5 以上版本的时候,在使用 * 通配符进行匹配的时候,要加上 ,且必须放在 action 的最后,否则路由无法匹配上

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13

<action name="book_*" class="cn.edu.xaut.action.BookACtion" method="{1}">

     <result>success.jsp</result>

     <result name="login">login.jsp</result>

     <interceptor-ref name="myStack" />

     <allowed-methods>add,del,find,update</allowed-methods>

</action>