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

Answered

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?

3 comments

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.

0

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

0

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

0

Please sign in to leave a comment.