解决The markup in the document following the root element must be well-formed.
出现问题的代码:
<security-constraint>
<web-resource-collection>
<web-resource-name>RegisteredUsers</web-resource-name>
<url-pattern>/ch06/6.3/6.3.4/security.jsp</url-pattern>
</web-resource-collection>
<auth-constraint> <!-- 可以访问的角色 -->
<role-name>registered_user</role-name>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint> <login-config>
<auth-method>BASIC</auth-method>
<realm-name>Registered Users</realm-name>
</login-config> <security-role>
<role-name>admin</role-name>
</security-role> <security-role>
<role-name>registered_user</role-name>
</security-role>
解决方法:
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<security-constraint>
<web-resource-collection>
<web-resource-name>RegisteredUsers</web-resource-name>
<url-pattern>/ch06/6.3/6.3.4/security.jsp</url-pattern>
</web-resource-collection>
<auth-constraint> <!-- 可以访问的角色 -->
<role-name>registered_user</role-name>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint> <login-config>
<auth-method>BASIC</auth-method>
<realm-name>Registered Users</realm-name>
</login-config> <security-role>
<role-name>admin</role-name>
</security-role> <security-role>
<role-name>registered_user</role-name>
</security-role>
</web-app>
解决The markup in the document following the root element must be well-formed.的更多相关文章
- 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 ...
- 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-a ...
- The markup in the document following the root element must be well-formed. Quartz.xml .......
这个错误说明是我的Quartz.xml文件的问题 错误描述:错误发生在文档的标记后,文档格式必须是良好的. 错误原因:我这里多写了个 </xml> 文件头的<?xml ?>只是 ...
- 如何有效地解决ie7,IE8不支持document.getElmentsByClassName的问题
1.复制此代码到你js代码的最前面即可 if(!document.getElementsByClassName){ document.getElementsByClassName = functi ...
- 解决IE8下不支持document.getElementsByClassName的方法
在代码前面加如下代码: if (!document.getElementsByClassName) { document.getElementsByClassName = function (clas ...
- mySQL 5.7版 解决密码登录失败Access denied for user 'root'@'localhost' (us
mySQL 5.7版 解决密码登录失败Access denied for user 'root'@'localhost' (us 2016-03-05 ...
- 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 ...
- ARM64平台编译stream、netperf出错解决办法 解决办法:指定编译平台为alpha [root@localhost netperf-2.6.0]# ./configure –build=alpha
ARM64平台编译stream.netperf出错解决办法 http://ilinuxkernel.com/?p=1738 stream编译出错信息: [root@localhost stream]# ...
- 解决: Fail to create empty document
做 Programming Windows with MFC 2nd 的例子 MyWord 的时候. 发现启动的时候总是报错: Fail to create empty document. 搜索了一下 ...
随机推荐
- 使用 Python 创建你自己的 Shell (上)
我很想知道一个 shell (像 bash,csh 等)内部是如何工作的.于是为了满足自己的好奇心,我使用 Python 实现了一个名为yosh(Your Own Shell)的 Shell.本文章所 ...
- springmvc跨域+token验证
1)app后台跨域设置 2)拦截器中设置http报文header中token 3)token的生成实现 ==================================== ...
- [NPM] Avoid Duplicate Commands by Calling one NPM Script from Another
We can get a lot of utility through CLI tools invoked via npm scripts. Many of these tools have APIs ...
- uva10401Injured Queen Problem(递推)
题目:uva10401Injured Queen Problem(递推) 题目大意:依然是在棋盘上放皇后的问题,这些皇后是受伤的皇后,攻击范围缩小了.攻击范围在图中用阴影表示(题目).然后给出棋盘的现 ...
- mac下的git的安装与简单的配置
git 本地操作 git 简单介绍 .Git是分布式的SCM,SVN是集中式的 2.Git每一个历史版本号存储完整的文件,SVN存储文件差异 3.Git可离线完毕大部分操作,SVN则相反 4.Git有 ...
- git——分布式版本控制系统
Git是一个开源的分布式版本控制系统,用以有效.高速的处理从很小到非常大的项目版本管理. Git 是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软件 ...
- 转:sock_ev——linux平台socket事件框架(uri地址的解析) .
在第一篇中,已经说明,传递的socket地址采取以下形式: [cpp] view plaincopyprint?stream://192.168.2.10:8080 dgram://192.168 ...
- 【转帖】云平台发现服务构建:为什么不使用ZooKeeper
http://www.chinacloud.cn/show.aspx?id=19979&cid=16 [日期:2015-04-29] 来源:dockerone 作者: [字体:大 中 小] ...
- 【LeetCode】111. Minimum Depth of Binary Tree (2 solutions)
Minimum Depth of Binary Tree Given a binary tree, find its minimum depth. The minimum depth is the n ...
- C# 图片转换为base64
WebRequest webRequest = WebRequest.Create("验证码url"); WebResponse webResponse = webRequest. ...