web.xml is missing and is set to true,eclipse报错解决办法(两种解决方法)
- 右击项目→JavaEE Tools→Generate Deployment Discriptor Stub,然后系统会在src/main/webapp/WEB_INF文件夹下创建web.xml文件,ok!
- 第二种解决方法:在pom.xml中加入配置如下:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>