maven web项目的web.xml报错The markup in the document following the root element must be well-formed.
maven项目里面的web.xml开头约束是这样的
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5" />
当在后面加了东西就会报错:
The markup in the document following the root element must be well-formed.
翻译下错误:根元素后面的文档中的标记必须很好地形成。
解决方法:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5" ><!--这里的“/”代表当前标签结束啊啊啊啊-->
</web-app>
maven web项目的web.xml报错The markup in the document following the root element must be well-formed.的更多相关文章
- 【Java】新建的web项目的jsp页面报错的解决方法
一.错误信息 当用Eclipse新建web项目后,在里面建个jsp页面可能出现如下图的错误,jsp文件有一个红叉: 主要原因是:依赖tomcat类库 解决方案:项目右击—>build path ...
- Caused by: org.xml.sax.SAXParseException; systemId: file:/home/hadoop/hive-0.12.0/conf/hive-site.xml; lineNumber: 5; columnNumber: 2; The markup in the document following the root element must be well
1:Hive安装的过程(Hive启动的时候报的错误),贴一下错误,和为什么错,以及解决方法: [root@master bin]# ./hive // :: INFO Configuration.de ...
- vue报错:Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.
在.vue文件中引入了 element-ui 的 table 和 pagination 组件后,报错:Component template should contain exactly one roo ...
- Eclipse搭建maven project web war项目pom.xml报错
在eclipse中搭建maven project时,在不使用模板的情况下,搭建的web项目会报错. 操作步骤如下: 1.勾选Create a simple project ,因为如果不勾选系统会提供模 ...
- 关于eclipse项目的x号报错的一些问题
有些时候项目中并未有什么问题 但项目前会有一个X号报错且无法运行项目 我们不妨从jre和Tomcat的一些配置中找原因 1,首先查看jre的安装是否正确,可以看见并未出错 ,如果有问题,重新导入一下即 ...
- Visual Studio中用于ASP.NET Web项目的Web服务器
当您在 Visual Studio 中开发 Web 项目时,需要 Web 服务器才能测试或运行它们. 利用 Visual Studio,您可以使用不同的 Web 服务器进行测试,包括 IIS Expr ...
- VUE之命令行报错:Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead 解决办法
Failed to compile. ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-5992 ...
- Idea创建Maven Web项目的web.xml版本问题
问题描述:创建Maven Web项目时,选择MavenWebapp模板时,自动生成的web.xml文件版本为1.4,如图所示 如何才能修改为常用的4.0版本的xml文件呢? 这个文件是从Maven仓库 ...
- 使用 java替换web项目的web.xml
创建一个接口: package my.web; public interface SpringWeb { void config(); } 实现类: package my; import my.web ...
随机推荐
- http的导图
- 浅尝https
HTTPS http超文本传输协议,所以的东西都是明文传输,容易被拦截,被攻击,我们希望能对通话内容进行加密,那么因此而生,出现了https https:在http的基础上新增加了SSL层 先放图 / ...
- Delphi 参数的传递
- 更改命令行,完全显示hostname
刚装完一台新服务器,想让命令行的能显示全部的hostname,查阅资料后,将$PS1的参数修改即可 1,echo $PS1 2,将其中的/h换成/H即可 3,我是在/etc/profile中加了一行 ...
- ibatis与mybatis的区别
一.最主要的区别就是mybatis简化了编码的过程,不需要去写dao的实现类,直接写一个dao的借口,再写一个xml配置文件,整个mybatis就配置好了,也就是数据库就连接好了,然后再service ...
- json校验失败的原因
如下原因会造成JSON校验失败,而且会让你不知道为什么失败 JSON字符串里的非数字型键值没有双引号 JSON中存在\t这样的制表符,看起来和空格一样,但是就是因为它的存在校验不通过.去掉就能过了. ...
- html中表单提交
表单提交代码 1.源代码分析 <!DOCTYPE html> <html lang="en"> <head> <meta charset= ...
- python1-集合、函数(全局变量与局部变量)
集合(set) # s=set('hello')# print(s)## s=set(['alex','alex','sb'])# print(s) # s={1,2,3,4,5,6} #添加# s. ...
- 加密web.config数据库连接
加密cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319aspnet_regiis.exe -pef "connectionStrings&q ...
- Python---函数参数---王伟
#### 定义函数 ```python#定义函数def function(): print("hello world")#调用函数function() #输出结果hello ...