出现问题的代码:

  

<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. ndk 编译 c++ 兼容性问题汇总整理

    转自:http://blog.csdn.net/wenrenwang/article/details/12003671 1.__int64找不到符号 采用int64_t来代替: #if defined ...

  2. [转]DICOM医学图像处理:Deconstructed PACS之Orthanc

    转载:http://blog.csdn.net/zssureqh/article/details/41424027 背景: 此篇博文介绍一个开源的.基于WEB的DICOM Server软件.该开源软件 ...

  3. 通过nc构造telnet后门

    nc被称为网络中的“瑞士军刀”,其功能强大,如果在肉鸡上运行“nc.exe –p port –L –d –e cmd.exe”命令就可以构建一个telnet后门,即使关闭了nc.exe程序运行窗口,该 ...

  4. Reverse Integer--整数的反转

    原题: Reverse digits of an integer. =>反转一个整数的数字.例子如下: Example1: x = 123, return 321 Example2: x = - ...

  5. 使用ReportStudio打开cube模型创建报表出现两个最细粒度名称

    本人也是第一次遇到这样的问题,此问题甚是简单,也许很简短的一句话就可以解决这个问题了,看官请留神哦 cube做好发布到cognos之后使用Analysis Studio打开结构正常 于是想到要用此数据 ...

  6. C#控件一览表

    C#控件一览表 .窗体 .常用属性 ()Name属性:用来获取或设置窗体的名称,在应用程序中可通过Name属性来引用窗体. () WindowState属性: 用来获取或设置窗体的窗口状态. 取值有三 ...

  7. iOS arc和非arc 适用 宏

    iOS arc和非arc 适用 宏 1:使用宏 + (void)showAlertWithMessage:(NSString *)messages { dispatch_async(dispatch_ ...

  8. 软件开发工具——Make

    掌握Makefile的使用方法和工作流程: 掌握make工具变量的相关知识,包括其引用.定义及分类等: 掌握Makefile常见的函数含义: 掌握Makefile与shell命令行的通信方法: 掌握M ...

  9. 安装TeX及中文支持

    2014.7.19更新: 以下的笔记适用于在基于Ubuntu的发行版(比方LinuxMint)安装Texlive2013.2014: 第一步依据本机状况.可能不须要. Texlive2014已经能够下 ...

  10. [原]理解HTTP之Content-Type

    http://homeway.me/2015/07/19/understand-http-about-content-type/ 0x01.About 查看Restful API 报头插件:utm_s ...