1.
2.
3.
4.
5.
这种错误是因为maven默认简单构建项目是sevlet3.0版本,web.xml不是必须的,这时候需要手动创建webapp/WEB-INF
/web.xml,web.xml可以从其他项目复制一个过来改改, 或者pom.xml添加如下配置。
最后修改完了别忘了右键项目Mavan/update project..
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
参考:http://blog.youkuaiyun.com/u010697681/article/details/50761184
6.亲测有效