0

我收到以下错误:

java.lang.ClassNotFoundException: org.springframework-web.servlet.DispatcherServlet
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
    at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:415)
    at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:397)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1062)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1010)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4935)
    at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5262)
    at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5257)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

我的 WEB-INF/lib 目录中有这些 .jar

spring-beans-3.2.0.RELEASE.jar
spring-context-3.2.0.RELEASE.jar
spring-core-3.2.0.RELEASE.jar
spring-expression-3.2.0.RELEASE.jar
spring-webmvc-3.2.0.RELEASE.jar
spring-web-3.2.0.RELEASE.jar

我还需要什么?

4

2 回答 2

3

它应该org.springframework.web.servlet.DispatcherServlet没有包名称中的破折号。只是你的一个错字web.xml

于 2013-01-14T16:21:58.810 回答
0

可能导致异常的因素:

  1. jar 未添加到WEB-INF/lib目录中
  2. DispatcherServlet 引用未正确配置web.xml

可以上传web.xml,项目结构,验证上面的信息吗?

于 2013-01-14T16:39:18.980 回答