我有一个使用 struts2 和 spring 3 的 Web 应用程序。为了配置 spring,我使用 eclipse 和 tomcat 中的构建路径在项目中添加了所需的库。我也在 web.xml 中添加了监听器,但是当我想运行应用程序时,会出现此错误:严重:配置类 org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web 的应用程序监听器时出错.context.ContextLoaderListener 我用谷歌搜索太多但什么也没发生..有人告诉我一定要在应用程序库和 tomacat 中添加 spring-web.jar,但没有任何变化..请帮忙
类路径:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre6">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0">
<attributes>
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.USER_LIBRARY/hibernate"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/antlr-2.7.6.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/asm-attrs.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/asm.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/cglib-2.1.3.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/commons-beanutils-1.8.2.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/commons-collections-3.1.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/commons-collections-3.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/commons-digester-2.1.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/commons-fileupload-1.2.2.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/commons-logging-1.0.4.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/commons-logging-1.1.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/commons-logging.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/DateConverter.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/dom4j-1.6.1.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/ejb3-persistence.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/freemarker-2.3.13.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/groovy-all-1.7.5.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/hibernate-annotations.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/hibernate-commons-annotations.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/hibernate-validator.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/hibernate3.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/hsqldb.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/imaging.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/iText-2.1.7.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/jasperreports-4.5.1.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/javassist-3.9.0.GA.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/jdt-compiler-3.1.1.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/jstl-1.2.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/jta-1.1.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/junit-3.8.1.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/log4j-1.2.15.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/ocrs12.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/ognl-2.6.11.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/orai18n.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/simplecaptcha-1.1.1.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/slf4j-api-1.5.8.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/slf4j-log4j12-1.5.8.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/sqljdbc4.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/standard.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/struts2-convention-plugin-2.1.6.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/struts2-core-2.1.6.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/struts2-fullhibernatecore-plugin-1.4-GA.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/xwork-2.1.2.jar"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.USER_LIBRARY/spring"/>
<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>