struts2 -- Unable to load configuration - bean - jar:file: struts-default.xml:47:178(已解决)
2009-11-25 18:17
429 查看
今天第一次搭建struts2框架,遇到的第一个问题:
INFO - Parsing configuration file [struts-default.xml]
ERROR - Dispatcher initialization failed
Unable to load configuration. - bean - jar:file:/D:/Tomcat%206.0/webapps/demo/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:47:178
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
web.xml
<!-- config struts2 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
解决方法:
在网上查到,应该把commons-fileupload-1.2.1.jar也加进来,就对了
INFO - Parsing configuration file [struts-default.xml]
ERROR - Dispatcher initialization failed
Unable to load configuration. - bean - jar:file:/D:/Tomcat%206.0/webapps/demo/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:47:178
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
web.xml
<!-- config struts2 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
解决方法:
在网上查到,应该把commons-fileupload-1.2.1.jar也加进来,就对了
相关文章推荐
- Unable to load configuration. - bean - jar: ....struts2-core-2.1.8.1.jar!/struts-default.xml:47:178
- Struts2 Unable to load configuration. - bean - jar ..... WEB-INF/lib/struts2-core-2.1.2.jar!/struts-default.xml:46:178 解决办法
- Struts2 Unable to load configuration. - bean - jar ..... WEB-INF/lib/struts2-core-2.1.2.jar!/struts-default.xml:46:178 解决办法
- Struts2 Unable to load configuration. - bean - jar ..... WEB-INF/lib/struts2-core-2.1.2.jar!/struts-default.xml:46:178 解决办法
- struts2出现Unable to load configuration. - bean - jar:file:/...struts-default.xml问题
- JAR包不全!Unable to load configuration.-bean-jar:file:/.../struts2-core-2.2.1.jar!/struts-default.xml:7
- unable to load configuration. bean jar file struts-default.xml
- 解决Struts2报错!!Unable to load configuration struts2-core-2.2.3.jar!/struts-default.xml:29:72报错
- struts2 :Unable to load configuration. ……struts-default.xml:46:178异常解决
- struts2 :Unable to load configuration. ……struts-default.xml:46:178异常解决
- struts2 :Unable to load configuration. ……struts-default.xml:46:178异常解决
- Struts2 WEB-INF/lib/struts2-core-2.1.8.1jar!/struts-default.xml:47:178
- Struts2 WEB-INF/lib/struts2-core-2.1.8.1jar!/struts-default.xml:47:178
- Struts2 WEB-INF/lib/struts2-core-2.1.2.jar!/struts-default.xml:46:178
- Struts2 WEB-INF/lib/struts2-core-2.1.8.1jar!/struts-default.xml:47:178
- struts2-core-2.3.16.3.jar!/struts-default.xml:40:72
- struts2-core-2.3.15.1.jar!/struts-default.xml:53:178核心包加载报错
- struts.xml中出现Package struts2 extends undefined package struts-default解决办法
- 解决struts报错问题Unable to load configuration struts2-core-2.3.16.3.jar!/struts-default.xml:40:72
- 解决Unable to read TLD "META-INF/tlds/struts-bean.tld" from JAR file