啓動tomcat後報Unable to locate configuration files of the name struts.xml的warming,修改web.xml文件後,問題解決:
web
<filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> <init-param> <param-name>config</param-name> <param-value>struts-default.xml,struts-plugin.xml,struts/struts.xml</param-value> </init-param> </filter>主要是,struts2默認從src目錄下加載文件,而咱們的文件在struts文件夾下,加上就行了。