【发布时间】:2019-01-04 10:30:14
【问题描述】:
struts.xml中有一个常量可以定义
<constant name="struts.action.extension" value="htm"/>
但我想尽量减少配置文件的使用。
【问题讨论】:
标签: jakarta-ee struts2 struts web.xml
struts.xml中有一个常量可以定义
<constant name="struts.action.extension" value="htm"/>
但我想尽量减少配置文件的使用。
【问题讨论】:
标签: jakarta-ee struts2 struts web.xml
我找到了这个解决方案:
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
<init-param>
<param-name>struts.action.extension</param-name>
<param-value>htm</param-value>
</init-param>
</filter>
【讨论】: