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>
本文介绍如何将 Struts2 中的 action 扩展名从默认的 .action 修改为 .do 形式。提供了两种方法:一是在 struts.xml 中配置;二是通过 web.xml 的 filter 进行设置。

被折叠的 条评论
为什么被折叠?



