Struts2中出现 Dispatcher initialization failed错误

 

在尝试搭建Struts2框架的时候出现该以下问题

Dispatcher initialization failed Unable to load configuration. - bean - jar:file:/D:/Workspaces/MyEclipse%208.6/.metadata/.me_tcat/webapps/demo/WEB-INF/lib/struts2-gxp-plugin-2.3.24.jar!/struts-plugin.xml:8:162 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70) at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57) ······················································

请无视路径的乱码 楼主是日文系统装的中午语言包。

经过一番查找发现是新建工程的时候楼主太贪心了把struts-2.3.24/lib下的jar包全部导入的缘故。

解决方案就是把原先导入的jar包全部删除

然后解压struts-2.3.24appsstruts2-blank.war文件,将该文件struts2-blank.warWEB-INFlib下的jar包导入即可

jar包导的太多也不好啊,顺便向大家请教一下,为何全部导入会报错呢?

经验分享 程序员 微信小程序 职场和发展