ClassNotFoundException DispatcherServlet when launching Tomcat (Maven dependencies not copied to wtpwebapps)

Take a look at “Deployment Assembly” section under project properties. The content of this page specify how your project is to be assembled into a running application. In particular, this is the place where you can control which of the libraries that your project references, should be packaged with it. Select Add -> Java Build Path Entries. You will be able to pick among your existing build path entries to include in the assembly.

The quick fix that you found did the same thing for you. If you are curious about what happens under the covers, take a look at your .classpath file before and after the quick fix. The quick fix tags the classpath entry with some assembly information.

Leave a Comment