Struts2中如何加载多个struts.xml配置文件

1、使用include引入多个配置文件

2、在web.xml中配置
<filter>
<filter-name>struts2 </filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher </filter-class>
<init-param>
<param-name>config </param-name>
<param-value>struts-default.xml,struts-plugin.xml,struts.xml ,struts-test.xml</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>struts2 </filter-name>
<url-pattern>/* </url-pattern>
</filter-mapping>

你可能感兴趣的:(struts.xml)