使用tomcat部署struts2 web项目时候,在日志中:
信息: Parsing configuration file [struts-default.xml]
2014-3-19 0:50:17 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
信息: Unable to locate configuration files of the name struts-plugin.xml, skipping
2014-3-19 0:50:17 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
信息: Parsing configuration file [struts-plugin.xml]
2014-3-19 0:50:18 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
信息: Parsing configuration file [struts.xml]
2014-3-19 0:50:18 org.apache.struts2.config.AbstractBeanSelectionProvider info
1.struts-default.xml
只读文件,是struts的核心配置文件
2.struts-plugin.xml
框架中使用到的插件,通常在struts lib 目录下面以plugin结尾的jar包。
比如json,配置文件如下:
<struts> <package name="json-default" extends="struts-default"> <result-types> <result-type name="json" class="org.apache.struts2.json.JSONResult"/> </result-types> <interceptors>
3.struts.xml
自己定义的配置文件,自己定义的Action,拦截器等。