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

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. 漫谈程序猿系列:她发现了一个Bug……

    watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZm9ydW9r/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/d ...

  2. /etc/ld.so.conf详解

    /etc/ld.so.conf 此文件记录了编译时使用的动态库的路径,也就是加载so库的路径.    默认情况下,编译器只会使用/lib和/usr/lib这两个目录下的库文件,而通常通过源码包进行安装 ...

  3. 汉字转拼音的vc++程序源代码

    #include "StdAfx.h" #include "MyChiToLetter.h" // Download by http://www.codefan ...

  4. ASP.NET之电子商务系统开发-1(数据列表)

    一.前言 首先声明的是,这是我第一个与别人合作的.net项目,另一个人做的是后台管理,我做的前台,这是一个电子商务的系统,主要实现的功能是查看商品以及购物功能. 二.开始 首先看一下我截取的项目部分商 ...

  5. Linux新手笔记 sudo

    centos 6.4 32bit 你是也像我一样,厌烦了在root用户和个人用户之间来回切换.或者干脆直接用root用户.可以这样设置,然后在命令前加sudo 即可使用自己到密码,临时用root身份执 ...

  6. Hibernate 总结一

    Session 当批量处理数据过大时,session这个集合会造成内存溢出,需要通过flush把session中的数据刷出到数据库中,让后再clear,清空缓存 一.集合映射. 类型 Java中声明 ...

  7. [C#绘图]Matrix类

    想要从入门到精通一门语言,最好的学习文档就是官方提供的文档,比如说OpenCV的学习,最权威的学习资料还是其官方的学习文档,C#和.net的最好的学习入门文档还是MSDN.但是好多人一开始真的不会用, ...

  8. javascriptDOM编程艺术_学习笔记_知识点 DOM

    第三章   getElementById    返回一个与那个有着给定id属性值的元素节点对应的对象. document.getElementById(id) 下面一个例子: document.get ...

  9. PHP_Yii框架_专辑<一>

    一.PHP主流框架 cakephp—速度比较慢.CI(codeIgniter)—小型.symfony. TP(thinkphp)—国人开发.小型.zendframework(官方)—大型 Yii: 特 ...

  10. javascript模块化编程(转载)

    Javascript 模块化编程 作者: 阮一峰  发布时间: 2013-01-08 18:04  阅读: 7632 次  推荐: 40   原文链接   [收藏]   随着网站逐渐变成"互 ...