java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet error

Thanks a lot guys for your valuable comments. You are all right. Jar files must be in WEB-INF/lib. Or you can tell Eclipse that it can find the jars in additional location and not just WEB-INF/lib.

How do we do that?

  • Right click the project and select properties. Now go to Deployment Assembly.

enter image description here

  • Now select Add and select Java build path entries.

enter image description here

  • Ivy option is automatically populated. Select that.

enter image description here

  • And you are done.Select Apply and ok. Classnotfound Exception vanishes.

enter image description here

Leave a Comment