数据源配置时加上编码转换格式后出问题了:
[quote]The reference to entity "characterEncoding" must end with the ';' delimiter[/quote]
这个错误就是 context.xml中设置数据源链接URL的问题
正确的如下:
这大概是由xml文件中的编码规则决定要这么变换。
在xml文件中有以下几类字符要进行转义替换:
[quote]< < 小于号
> > 大于号
& & 和
' ' 单引号
" " 双引号[/quote]
[quote]The reference to entity "characterEncoding" must end with the ';' delimiter[/quote]
这个错误就是 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文件中有以下几类字符要进行转义替换:
[quote]< < 小于号
> > 大于号
& & 和
' ' 单引号
" " 双引号[/quote]
本文详细介绍了在XML配置中遇到的编码转换错误,并提供了正确的解决方案,包括XML文件中的字符转义规则和常见编码问题的解决方法。
1160

被折叠的 条评论
为什么被折叠?



