The reference to entity "characterEncoding" mus...

數據源配置時加上編碼轉換格式後出問題了: mysql

The reference to entity "characterEncoding" must end with the ';' delimiter sql

這個錯誤就是 context.xml中設置數據源連接URL的問題    編碼

<context-param> url

    <param-name>url</param-name> spa

    <param-value>jdbc:mysql://localhost:3306/bookstore?useUnicode=true&characterEncoding=UTF-8</param-value> code

</context-param> xml

正確的以下: ci

<context-param> it

    <param-name>url</param-name> table

    <param-value>jdbc:mysql://localhost:3306/bookstore?useUnicode=true&amp;characterEncoding=UTF-8</param-value>

</context-param>

這大概是由xml文件中的編碼規則決定要這麼變換。

在xml文件中有如下幾類字符要進行轉義替換:

&lt;

<

小於號

&gt;

>

大於號

&amp;

&

&apos;

'

單引號

&quot;

"

雙引號

相關文章
相關標籤/搜索