现象:Action 定义为通配符形式,Action中的delete,input等方法访问正常,但新加的其它方法(如a(), b())无法访问
原因:strust2 2.3以上版本增加了安全控制
解决办法:
在<action>配置中增加<allowed-methods>:
<action name="a-*" class="aAction" method="{1}">
…………
<allowed-methods>a,b</allowed-methods>
</action>
可参考官网:http://struts.apache.org/docs/action-configuration.html#ActionConfiguration-StrictDMI