错误代码
Unable to load configuration. - bean - jar:file:/D:/www/java/deercms/WebRoot/WEB-INF/lib/struts2-spring-plugin-2.2.1.1.jar!/struts-plugin.xml:29:132
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)spring3 整合struts2 出现struts2-spring-plugin-2.2.1.1.jar!/struts-plugin.xml错误 配置基本上已经弄好了,只要我加入struts2-spring-plugin-2.2.1.1.jar 包,程序就运行不起来,网上都查了一下 都说是包有冲突我配置如下
web.xml
<!-- 定义Spring配置文件位置 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<!-- 对Spring容器进行实例化 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>struts.xml<!-- 配置使用Spring管理Action -->
<constant name="struts.objectFactory" value="spring" />实在不知道办,请教各位大侠!
Unable to load configuration. - bean - jar:file:/D:/www/java/deercms/WebRoot/WEB-INF/lib/struts2-spring-plugin-2.2.1.1.jar!/struts-plugin.xml:29:132
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)spring3 整合struts2 出现struts2-spring-plugin-2.2.1.1.jar!/struts-plugin.xml错误 配置基本上已经弄好了,只要我加入struts2-spring-plugin-2.2.1.1.jar 包,程序就运行不起来,网上都查了一下 都说是包有冲突我配置如下
web.xml
<!-- 定义Spring配置文件位置 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<!-- 对Spring容器进行实例化 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>struts.xml<!-- 配置使用Spring管理Action -->
<constant name="struts.objectFactory" value="spring" />实在不知道办,请教各位大侠!
解决方案 »
- 信息类网站管理,如何针对关键字设置链接的?
- 数据库中怎么存放文件地址时\变成了.
- XFire WebService中转发HTTP请求
- 关于JSF中的自定义验证器的问题!
- 有没有了解OrientDB的
- linux环境下tomcat容器无法启动
- 寻找jboss与tomcat整合版的下载地址
- Tomcat显示路径下全部文件的问题
- jdbc for sqlServer2000
- 用JBuilder8显示以前的*.xml文件其中的中文怎么是乱码呢?*.java中也是,怎么回事?
- java 的string转换byte问题
- 刚用spring3.0+hibernate3.x+struts2.x搭建的,结果无法正常启动,求指点
antlr-2.7.6.jar
commons-collections-3.2.jar
commons-dbcp.jar
commons-digester-2.0.jar
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
commons-logging-1.0.4.jar
commons-pool.jar
dom4j-1.6.1.jar
freeer-2.3.16.jar
hibernate3.jar
javassist-3.9.0.GA.jar
jta-1.1.jar
log4j-1.2.15.jar
mysql-connector-java-5.1.6-bin.jar(MySQL jar包)
ognl-3.0.jar
slf4j-api-1.5.8.jar
slf4j-log4j12-1.5.0.jar
spring.jar
struts2-core-2.2.1.jar
struts2-spring-plugin-2.2.1.jar
xwork-core-2.2.1.jar
filter用下面的 <filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter> <filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
最后如果用了spring的struts2插件包,那么<constant name="struts.objectFactory" value="spring" />这句话是可以省略的,因为在插件包里已经包含了