如果想通过aciton!method.action的形式访问,需要做两个设置
1、配置文件中设置动态方法调用为true
<constant name="struts.enable.DynamicMethodInvocation" value="true" />2、action中配置值允许的方法:
<allowed-methods>login,logout</allowed-methods>
struts2动态方法的配置
原文:https://www.cnblogs.com/deecold/p/9119999.html