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

    这个错误就是 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;

    "

    双引号

    在配置tomcat mysql连接池时遇到了一个语法错误,记录下解决方法!

  • 相关阅读:
    Java数组分配内存空间
    Java中的数组
    Java中可变参数
    什么是方法的重载
    break语句与continue语句
    三大循环结构
    程序流程控制
    Java的运算符
    基本数据类型转换之向上转型和向下转换
    修改IIS虚拟目录名称
  • 原文地址:https://www.cnblogs.com/ventry/p/2767836.html
Copyright © 2011-2022 走看看