严重: Dispatcher initialization failed
Unable to load configuration. - bean - jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/Struts2Demo01/WEB-INF/lib/struts2-core-2.1.8.jar!/struts-default.xml:47:178
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
解决办法:
除了
commons-logging-1.0.4.jar
freemarker-2.3.12.jar
ognl-2.6.11.jar
struts2-core-2.1.2.jar
xwork-2.1.1.jar
这五个核心LIB要复制外,
commons-io-1.3.2.jar
commons-fileupload-1.2.1.jar
这两个Jar文件也必须放到指定目录
本文介绍了Struts2框架中Dispatcher初始化失败的问题及解决方案。主要原因是未能加载到struts-default.xml配置文件,解决方法包括确保核心库文件正确放置,如commons-logging、freemarker、ognl等,并特别强调了还需添加commons-io与commons-fileupload两个额外的jar包。

9279

被折叠的 条评论
为什么被折叠?



