在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-conf/admin-struts.xml</param-value>
</init-param>
<init-param>
<param-name>actionPackages</param-name>
<param-value>test.web</param-value>
</init-param>
</filter>