來自:http://blog.csdn.net/sinat_25306771/article/details/53921058
數據源配置時加上編碼轉換格式后出問題了:
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文件中有以下幾類字符要進行轉義替換: