• 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;

    "

    双引号

     

  • 相关阅读:
    meanshift聚类的实现
    birch聚类算法
    DBSCAN聚类算法的实现
    discrete adaboost的C++实现
    kd-tree的实现
    红黑树的实现——插入
    24位位图转8位灰度图
    将RGB数据写入BMP位图文件
    splay树的实现
    AVL树的实现
  • 原文地址:https://www.cnblogs.com/yangkai-cn/p/4016607.html
Copyright © 2020-2023  润新知