web.xml is missing and <failOnMissingWebXml> is set to true

来源:互联网 发布:node.js urlencoder 编辑:程序博客网 时间:2024/06/14 17:01

1、错误描述

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">  <modelVersion>4.0.0</modelVersion>  <groupId>com.you.cup</groupId>  <artifactId>CUP</artifactId>  <version>0.0.1-SNAPSHOT</version>  <packaging>war</packaging>  </project>
web.xml is missing and <failOnMissingWebXml> is set to true

2、错误原因

      由错误提示可知,缺少web.xml文件


3、解决办法
(1)选中项目,鼠标右键,点击“Java EE Tools”

(2)选择“Generate Deployment Descriptor Sub”,生成WEB-INF文件夹和web.xml

阅读全文
1 0
原创粉丝点击