Spring-MVC in Maven, DispatchServlet is not found in web.xml


I am new to IntelliJ. I am trying to build a spring-mvc project with maven in IntelliJ. The IDE prompts that DispatchServlet is not found in web.xml. I have added the spring-webmvc (and the necessary dependencies) in pom. The solution in Eclipse is to add the maven dependencies in class build path, what's the solution in IntelliJ?


Does your project build and run from the command line Maven? If so, it should also work from IDEA.

In case it works from the command line, but not from IDEA, please attach a sample project to reproduce it.


I got it fixed, I removed the dependencyManagement tag in pom and it works


I thought the the cause of the problem was the maven dependency was not picked up by the web app.


Please sign in to leave a comment.