简体   繁体   中英

org.springframework.web.servlet.DispatcherServlet class not found

I've some issue starting my Tomcat under Eclipse IDE. I followed all instruction to create a MVC web application using Spring Tutorial (actually not only one, just to be sure I'm doing right) and, when I start Tomcat from Eclipse I've this problem:

Error loading WebappClassLoader
  context: /CG
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@70ba9340
 org.springframework.web.servlet.DispatcherServlet
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)

I tried to check on internet for some similar problem but all solution proposed doesn't works. I checked my classpath and all lib are available, I manually copied all jar to the WEB-INF/lib folder but still not working.

I included:

org.springframework.asm-3.1.0.M1.jar
org.springframework.beans-3.1.0.M1.jar
org.springframework.context-3.1.0.M1.jar
org.springframework.context-support-3.1.0.M1.jar
org.springframework.core-3.1.0.M1.jar
org.springframework.expression-3.1.0.M1.jar
org.springframework.jdbc-3.1.0.M1.jar
org.springframework.test-3.1.0.M1.jar
org.springframework.transaction-3.1.0.M1.jar
org.springframework.web-3.1.0.M1.jar
org.springframework.web-servlet-3.1.0.M1.jar

May you help me, please? I'm really frustrated about this issue....

tnx, Andrea

Copy all spring releated jars into {tomcat_installation}/lib for tomcat 6 and for tomcat 5.x {tomcat_installation}/shared/lib.

DispatcherServlet is typically in the spring-webmvc-${version}.jar .

I suggest using Maven or Ivy to manage those dependencies for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM