解决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. 搜索了一下 ...
随机推荐
- 数学图形(2.19) 利萨茹3D曲线
在前面的章节数学图形(1.13) 利萨茹曲线中,写的是二维的利萨茹曲线,这一节,将其变为3D图形. #http://www.mathcurve.com/courbes3d/lissajous3d/li ...
- C++中函数调用时的三种参数传递方式详解
在C++中,参数传递的方式是“实虚结合”. 按值传递(pass by value) 地址传递(pass by pointer) 引用传递(pass by reference) 按值传递的过程为:首先计 ...
- [Todo] solr, lucence等学习
先参考这个吧 http://www.shareditor.com/blogshow/6
- fonts.conf 中文手册
FONTS-CONF(5) FONTS-CONF(5) 名称 fonts.conf -- 字体配置文件 文件概要 /etc/fonts/fonts.conf /etc/fonts/fonts.dtd ...
- 十个书写Node.js REST API的最佳实践(上)
收录待用,修改转载已取得腾讯云授权 原文:10 Best Practices for Writing Node.js REST APIs 我们会通过本文介绍下书写Node.js REST API的最佳 ...
- WebApi-如何实现接口加密
方法一 加一个访问token.例如你的api地址是http://www.example.com/api.php需要接受的参数有a,b,c三个那么可以加一个验证token(通过约定的key加密生成). ...
- C#基础视频教程4.2 如何编写简单的计算器
用过VB6或者早期代码的人都应该能感觉到,C#目前也没看出来有什么特别之处,所谓的面向对象也没有什么体现.所以我们需要在原有基础上重写一份代码,然后比较两种做法的优缺点.我们在项目上右击添加一个Fun ...
- Service 生命周期
有了 Service 类我们如何启动他呢,有两种方法: • Context.startService() • Context.bindService() 1. 在同一个应用任何地方调用 start ...
- UDP Sockets in C#
UDP provides an end-to-end service different from that of TCP. In fact, UDP performs only two functi ...
- it-tidalwave-semantic-aux-1.0.13.jar下载
今天来给大家分一下一下自己认为还是挺不错的jar包下载网址,it-tidalwave-semantic-aux-1.0.13.jar,作为java开发人员可能时时刻刻都在跟jar包打交道,即使这会用不 ...