出现问题的代码:

  

<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.的更多相关文章

  1. 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 ...

  2. 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 ...

  3. The markup in the document following the root element must be well-formed. Quartz.xml .......

    这个错误说明是我的Quartz.xml文件的问题 错误描述:错误发生在文档的标记后,文档格式必须是良好的. 错误原因:我这里多写了个 </xml> 文件头的<?xml ?>只是 ...

  4. 如何有效地解决ie7,IE8不支持document.getElmentsByClassName的问题

    1.复制此代码到你js代码的最前面即可   if(!document.getElementsByClassName){ document.getElementsByClassName = functi ...

  5. 解决IE8下不支持document.getElementsByClassName的方法

    在代码前面加如下代码: if (!document.getElementsByClassName) { document.getElementsByClassName = function (clas ...

  6. mySQL 5.7版 解决密码登录失败Access denied for user 'root'@'localhost' (us

    mySQL 5.7版 解决密码登录失败Access denied for user 'root'@'localhost' (us             2016-03-05              ...

  7. 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 ...

  8. 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]# ...

  9. 解决: Fail to create empty document

    做 Programming Windows with MFC 2nd 的例子 MyWord 的时候. 发现启动的时候总是报错: Fail to create empty document. 搜索了一下 ...

随机推荐

  1. 基于restful注解(spring4.0.2整合flex+blazeds+spring-mvc)<一>

    摘自: http://www.blogjava.net/liuguly/archive/2014/03/10/410824.html 参考官网:1.http://livedocs.adobe.com/ ...

  2. Android4.2.2 Gallery2源码分析(2)——发现Gallery.java

    上文中,main.xml是我直接提出来的,并没有说明是怎么找到它的,现在说明发现它的理由: 一般我们分析界面布局会用到hierarchyviewer这个工具,从工具中,我们对应到视图,最主要的视图id ...

  3. 一篇文章让你读懂Pivotal的GemFire家族产品

    一篇文章让你读懂Pivotal的GemFire家族产品 学习了:https://www.sohu.com/a/217157517_747818

  4. html 中几次方,平方米,立方米.

    m的n次方表示法:mn m<sup>n</sup> 10<sup>6</sup> m的n次方表示法:mn m<sub>n</sub&g ...

  5. Error: Cannot find module 'express' 之 解决方案

    出现如题错误,是因为执行了#npm install -g express的缘故,express没有被写到package.json里面去. 解决也好办,在程序目录下执行#npm install expr ...

  6. 关于使用jquery时,ie8下提示对象不支持的属性或方法的解决办法

    转自:http://wapapp.baidu.com/auoong/item/538790fcbe87c834d7ff8cde 首先这个问题的前提是已经排除了常见的这个问题.下面说一种今天我碰到的一种 ...

  7. (剑指Offer)面试题43:n个骰子的点数

    题目: 把n个骰子仍在地上,所有骰子朝上一面的点数之和为s.输入n,打印出s的所有可能的值出现的概率. 思路: s可能出现的值的范围为:n--6*n 1.全排列 回溯法枚举n个骰子(6面)的全排列,然 ...

  8. (剑指Offer)面试题39:二叉树的深度

    题目: 输入一棵二叉树,求该树的深度.从根结点到叶结点依次经过的结点(含根.叶结点)形成树的一条路径,最长路径的长度为树的深度. 结点的定义如下: struct TreeNode{ int val; ...

  9. 出现RST的几种情况

    1.端口未打开,C向S发送SYN,去连接S的端口9820,但是S没有打开9820端口,这个时候S发送RST 2.请求超时,C向S发送SYN,S回复ACK+SYN,如果C从发送SYN到收到S的ACK+S ...

  10. UITextView 添加 pleaceholder

    UITextView 默认没有 pleaceholder属性: 我们可以通过多种方式添加 在UITextView的代理方法中写 - (void)textViewDidBeginEditing:(UIT ...