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

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;

"

双引号

转载:http://boyadn.blog.163.com/blog/static/74230736201012292739317/

The reference to entity "characterEncoding" must end with the ';' delimiter的更多相关文章

  1. xml文件中配置JDBC源遇到问题 : The reference to entity "characterEncoding" must end with the ';' delimiter

    数据源配置时加上编码转换格式后出问题了: The reference to entity"characterEncoding" must end with the ';' deli ...

  2. The reference to entity "characterEncoding" must end with the ';' delimiter (Mybatis + Mysql)

    数据源配置时加上编码转换格式后出问题了: The reference to entity "characterEncoding" must end with the ';' del ...

  3. java报错:The reference to entity "characterEncoding" must end with the ';' delimiter.

    java关于报错:The reference to entity "characterEncoding" must end with the ';' delimiter. Java ...

  4. 在java的xml文件配置数据库URL地址时提示The reference to entity "characterEncoding" must end with the ';' delimiter.错误信息

    配置数据库的URL<property name="url" value="jdbc:mysql://127.0.0.1:3306/micro_message&quo ...

  5. Caused by: org.xml.sax.SAXParseException: The reference to entity "characterEncoding" must end with the ';' delimiter.

    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Sourc ...

  6. 配置c3p0-config.xml数据库连接池,jdbcurl配置项报错Type The reference to entity "useUnicode" must end with the ';' delimiter.

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xml> <c3p0-confi ...

  7. 项目配置 xml文件时 报错提示(The reference to entity "useSSL" must end with the ';' delimiter.)

    这次在配置xml文件时,出现错误提示( The reference to entity “useSSL” must end with the ‘;’ delimiter.) 报错行为 <prop ...

  8. 在配置XML时报的The reference to entity "dataSource" must end with the ';' delimiter错误

    <?xml version="1.0" encoding="UTF-8"?> <ECharts> <element>http ...

  9. XML报错:The reference to entity "characterEncoding" must end with the ';' delimite

    解决方法: 在web.xml增加如下配置: <filter>  <filter-name>encodingFilter</filter-name>  <fil ...

随机推荐

  1. [置顶] C#扩展方法 扩你所需

    通过前面的学习,了解到:使用扩展方法,可以向现有类型“添加”方法.本文将使用扩展方法来对系统类型,自定义类型及接口进行方法扩展,一睹扩展方法的风采. 1.使用扩展方法来扩展系统类型 String是c# ...

  2. 彻底解决Android因加载多个大图引起的OutOfMemoryError,内存溢出的问题

    最近因为项目里需求是选择或者拍摄多张照片后,提供滑动预览和上传,很多照片是好几MB一张,因为目前的Android系统对运行的程序都有一定的内存限制,一般是16MB或24MB(视平台而定),不做处理直接 ...

  3. 整数数组的定义,然后输入一个整数X,假定X不在这个数组,返回小于X位置的最大数目i而超过X位置的最小数目j

    //整数数组的定义,然后输入一个整数x,假定X不在这个数组,返回小于X位置的最大数目i而超过X位置的最小数目j: //如果X在该阵列,返回位置的阵列中的数. 资源: #include<iostr ...

  4. ios蓝牙开发(三)app作为外设被连接的实现

    再上一节说了app作为central连接peripheral的情况,这一节介绍如何使用app发布一个peripheral,给其他的central连接 还是这张图,central模式用的都是左边的类,而 ...

  5. iOS 切割图片

    - (UIImage *)CutImageWithImage:(UIImage *)image withRect:(CGRect)rect { //使用CGImageCreateWithImageIn ...

  6. 【微信公众号】使用a标签打开链接显示空白

    window.location.href 改成 top.location.href

  7. C# 课堂总结3-语句

    一.顺序语句 二.条件,分支语句 1.if语句 关键是能够熟练运用 if的嵌套.要考虑好所有的情况. 如果说 条件是两种+情况相互对应的,那么就可以只用 if 与else .但必须要想好 每个else ...

  8. BZOJ 4305: 数列的GCD( 数论 )

    对于d, 记{ai}中是d的倍数的数的个数为c, 那么有: 直接计算即可,复杂度O(NlogN+MlogM) --------------------------------------------- ...

  9. 2.PHP 教程_PHP 安装

    您需要做什么? 找一个支持PHP和MySQL的主机 在您自己的PC机上安装web服务器,然后安装PHP和MySQL 使用支持PHP的Web的主机 如果您的服务器支持PHP,那么您不需要做任何事情. 只 ...

  10. vs2013 cpu占用100%问题

    是由于显卡驱动支持wpf有问题 更新驱动或设置里取消自动调节视觉效果 http://support.microsoft.com/kb/2894215