unable to locate configuration files of the name struts-plugin.xml提示信息的解决办法

unable to locate configuration files of the name struts-plugin.xml提示信息的解决办法unabletoloca xml skipping

今天手工写个struts2web例子,总是出现unable to locate configuration files of the name struts-plugin.xml的信息(不是错误,也不是敬告) ,看着很别扭,也搜了一下这方面的东西,不过没有找到确切的解决办法。

 

自己来试下,

 

lib目录下的jar包:

commons-fileupload-1.2.1.jar

commons-logging-1.0.4.jar

freemarker-2.3.15.jar

ognl-2.7.3.jar

struts2-core-2.1.8.1.jar

xwork-core-2.1.6.jar

 

然后点击startup.bat启动tomcat,这时会有

unable to locate configuration files of the name struts-plugin.xml

的信息。

 

分析下,从字面理解,struts-plugin.xml,不能定位名字为名字为struts-plugin.xml的文件。应该是给struts2的插件机制有关,现在要在lib下添加一个struts2的任意一个插件

添加两个jar包

struts2-json-plugin-2.1.8.1.jar

json-lib-2.1.jar

 

然后启动tomcat

现在看到,没有了

unable to locate configuration files of the name struts-plugin.xml

的信息。

 

由此可见。

信息unable to locate configuration files of the name struts-plugin.xml是struts2插件机制引起的,如果在struts2应用中没有添加任何插件的话,那么会出现该信息的提示,(其实这条提示后面有一个词:skip,直接跳过了)。反之,添加了struts2的任何一款插件,则不会有这个提示。

 

个人理解,欢迎拍砖。

编程小号
上一篇 2025-06-08 10:30
下一篇 2025-09-22 16:30

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/bian-cheng-ji-chu/97176.html