【转】The reference to entity "characterEncoding" must end with the ';' delimiter
2012-11-13 13:22
411 查看
数据源配置时加上编码转换格式后出问题了:
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&characterEncoding=UTF-8</param-value>
</context-param>
这大概是由xml文件中的编码规则决定要这么变换。
在xml文件中有以下几类字符要进行转义替换:
<
<
小于号
>
>
大于号
&
&
和
'
'
单引号
"
"
双引号
在配置tomcat mysql连接池时遇到了一个语法错误,记录下解决方法!
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&characterEncoding=UTF-8</param-value>
</context-param>
这大概是由xml文件中的编码规则决定要这么变换。
在xml文件中有以下几类字符要进行转义替换:
<
<
小于号
>
>
大于号
&
&
和
'
'
单引号
"
"
双引号
在配置tomcat mysql连接池时遇到了一个语法错误,记录下解决方法!
相关文章推荐
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter (Mybatis + Mysql)
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter.
- Caused by: org.xml.sax.SAXParseException: The reference to entity "characterEncoding" must end with the ';' delimiter.
- 配置JNDI 报错 The reference to entity "characterEncoding" must end with the ';' delimiter
- 【url】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
- java报错:The reference to entity "characterEncoding" must end with the ';' delimiter.
- 关于The reference to entity "characterEncoding" must end with the ';' delimiter. org.xml.sax.SAXParseE
- 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
- xml文件中配置JDBC源遇到问题 : The reference to entity "characterEncoding" must end with the ';' delimiter
- 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
- The reference to entity "characterEncoding" must end with the ';' delimiter
- 配置JNDI 报错 The reference to entity "characterEncoding" must end with the ';' delimiter