zoukankan      html  css  js  c++  java
  • 报错The reference to entity "characterEncoding" must end with the ';' delimiter

    The reference to entity "characterEncoding" must end with the ';' delimiter

    数据源配置时加上编码转换格式后出问题了:

    The reference to entity "characterEncoding" must end with the ';' delimiter

    这个错误就是 context.xml中设置数据源链接URL的问题   

    <context-param>

        <param-name>url</param-name>

        <param-value>jdbc:mysql://localhost:3306/bookstore?useUnicode=true&characterEncoding=UTF-8</param-value>

    </context-param>

    正确的如下:

    <context-param>

        <param-name>url</param-name>

        <param-value>jdbc:mysql://localhost:3306/bookstore?useUnicode=true&amp;characterEncoding=UTF-8</param-value>

    </context-param>

    这大概是由xml文件中的编码规则决定要这么变换。

    在xml文件中有以下几类字符要进行转义替换:

     

     

    &lt;

     

    <

     

    小于号

     

    &gt;

     

    >

     

    大于号

     

    &amp;

     

    &

     

     

    &apos;

     

    '

     

    单引号

     

    &quot;

     

    "

     

    双引号

    技术,编程,音乐
  • 相关阅读:
    JAVA中数据类型转换
    PADS故障解决
    KEIL4.12中添加ULINK2的支持
    身份证号码规则
    用19种编程语言写Hello World
    30年的Hello world
    Java Annotation手册
    线控耳机原理图
    破解EXCEL2007的密码
    [野狐行][内存辅助][二重门更新中][2016/6/1]
  • 原文地址:https://www.cnblogs.com/mjhuang/p/4047115.html
Copyright © 2011-2022 走看看