struts2通配

mac2022-06-30  86

通配默认是用!连接的. ({0}:表示第一个*)

1.提交action的命名规则:    action="Action名!method";

2.struts2文件的配置:  <action name="Action名!*" method="{0}">

             </action>

 

还有一种更通配的方法:   ({1}表示第一个*)

1.提交的form action="Action名_method";

2.struts2文件中的通配:<action name="*_*" method="{2}" class="{a}Action">

           </action>

转载于:https://www.cnblogs.com/yanjunwu/archive/2013/05/16/3082327.html

相关资源:struts2的注解及通配符的简单实例
最新回复(0)