因为懒,所以通常在创建maven工程的时候通常采用两种办法:
1、copy一份已有的maven工程, 然后修改;
2、新创建一个WEB工程,然后将其转换为maven工程;
第一种方法是复用的好方法,这也是搭建框架的意思之一不是[憨笑]。
闲话少讲,进入正题。准备采用一些新奇技术,所以打算重新搭建一个环境。采用上面所说的第二种方法搭建,各种配置搞掂之后,maven build一下,build出错了,错误信息如下:
注意看上图的关键句子:
webxml attribute is required说web.xml是必须的,回头看一下工程,工程截图如下:
可以看到是有web.xml的,那么问题就来了,为何有,但是maven build的时候却说找不到呢?
原因很简单:
新建动态web工程的时候,默认创建的webroot是:WebContent,而maven的web工程默认的webroot是在src\main\webapp。如果在此目录下找不到web.xml就抛出以上的异常。
解决方法有两个:
1、删除WebContent文件夹,新建文件夹:src/main/webapp
2、在pom.xml文件中将webroot的路径配置进去,如下图:
至此,问题得以解决。
- 大小: 53.2 KB
- 大小: 12.1 KB
- 大小: 10.5 KB
分享到:
相关推荐
Web应用就是包括了一系列Servlet 、JSP 、 HTML等相关文件的集合,它需要成功...服务器中才能运行和被访问。 根据Servlet的规范,Web应用中的所有文件必须按照特定的目录结构进行组织,才能顺利地部署到不同服务器中
HtmlUnit 版本2.48.0 / 2021年3月20日 :red_heart: 主页 消息 下载 对于maven,您将添加: ... <artifactId>htmlunit <version>2.48.0 ...HtmlUnit是“用于Java程序的GUI更少的浏览器”。... 它具有相当不错JavaScript...
sam = sce.tl.sam(adata, inplace=True) #adata is your AnnData object 要求 numpy scipy pandas scikit-learn umap-learn numba anndata 可选依赖项 交互式GUI(Jupyter笔记本) plotly==4.0.0 ...
颜色分类leetcode 06/01/20 更新 回顾 2 年前的代码,我认为这完全是狗屎。 相反,我打开了另一个 repo,它应该会产生更好的结果并且代码更具可读性: 这个新的 ...将产生更准确的结果,因为它基于梯度图,如果梯度足够...
Software Factories - Assembling Applications with Patterns, Models, Frameworks, and Tools (2004) - LiB.part2.rar
It starts with creating the software, compiling and assembling the software, loading it into memory, and running it. It then briefly explains how executing instructions results in operations in digit...
Assembling polystyrenes spheres arrays in specified regions for required nanophotonic structures
Lithography is an extremely complex tool – based on the concept of “imprinting” an original template version onto mass output – originally using relatively simple optical exposure, masking, and ...
功能单分子在界面的自组装及其对界面疏水性的修饰,荆晶,张延武,相对于多分子自组装,单分子自组装具有结构稳定和对浓度不敏感的优点。本实验通过联用ROMP 和RAFT聚合合成两种多支链梳状功能聚合物
Memory Scan: Fixed a rare situation that could cause an error Memory Scan: Simple values now works with groupscan Memory Scan Lua: Scanfiles now also get deleted if the memory scan object is freed ...
Component-based systems are built by assembling components developed independently of the systems. To assemble components, a proprietary code that connects the components is usually needed. ...
Assembling the SIMATIC NET FC FO LC Plug - Assembly Instructions[手册]pdf,
SnapBlocks: a snapping interface for assembling toy blocks with XBOX Kinect
key tasks in Excel is pulling in and assembling matching data from different sources. To do this, you need to know Excel’s Vlookup() function. This entire chapter focuses on this function, including ...
Specific attention is given in the book to the thought process involved in choosing and assembling APEX components and features to deliver a specific result. Understanding Oracle APEX 5 Application ...
stage cylindrical gear reducer is arranged asymmetrically, the load distribution along the tooth direction is uneven, and the shaft stiffness is required. Chapter 3 Selection of Motor 3.1 Motor Type ...
包含了全部汇编指令,高清pdf,方便快速查找,可以打印
This book is an introduction to x64 assembly language This is the language used by almost all modern desktop and laptop computers x64 is a generic term for the newest generation of the x86 CPU used by...