web.xml is missing and <failOnMissingWebXml> is set to true
来源:互联网 发布:面试java项目技术难点 编辑:程序博客网 时间:2024/06/05 23:08
在创建一个maven项目后,在 pom.xml文件中报错:
web.xml is missing and <failOnMissingWebXml> is set to true
这是因为你因为你WEB-INF下没有web.xml导致造成的
1,假如你的项目是web项目,即创建时选择了war:
解决方案:
右键项目——>Deployment Descriptor:项目名——>Generate Deployment Descriptor Stub.
然后系统 会在src/main/webapp/WEB_INF文件加下创建web.xml文件。
此时,问题解决
2,如果不是web项目,即创建时选择了jar:
解决方案:
在pom文件中配置failOnMissingWebXml。配置如下:
<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>
阅读全文
1 1
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- sql查询
- jmeter个人学习之路--jmeter常用函数整理
- phantomjs实现html生成pdf
- [SQL]无法绑定由多个部分组成的标识符
- B2C商城APP开发方案及流程
- web.xml is missing and <failOnMissingWebXml> is set to true
- 第十八周:[Leetcode]98. Validate Binary Search Tree
- PHP中imagecopyresampled参数详解
- HTML标签语义
- MongoDB数据库设计准则
- Ajax自己的 属性提示错误 error:function(){} $.post().error() .ajaxError()
- bootstap 3.x+springMVC 发生图标不出来,样式还有
- Windows Server 2008 R2安装IIS
- javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name解决