struts2中action的默认拓展名是".action",而之前的拓展名一直为".do",工作中需要要把struts2的action拓展名改为".do"的形式,查了一下,找到两种方法:
- 在struts.xml中进行如下配置
<constant name="struts.action.extension" value="do" />
- 在web.xml的filter中进行配置<init-param>
<param-name>struts.action.extension</param-name> <param-value>do</param-value> </init-param>