- 論壇徽章:
- 0
|
關(guān)于tomcat5+mysql3.23.39-nt連接池的字符編碼設(shè)置問題
我看MySQL Connector/J Documentation中說的
The JDBC URL format for MySQL Connector/J is as follows, with items in square brackets ([, ]) being optional:
jdbc:mysql://[host][,failoverhost...][]/[database][?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]...
也就是說多個參數(shù)要用"&"連接
server.xml的部分代碼
<parameter>;
<name>;url</name>;
<value>;jdbc:mysql://localhost:3306/struts?useUnicode=true&characterEncoding=gb2312</value>;
</parameter>;
然后啟動tomcat
有如下部分錯誤信息
2004-7-18 11:36:37 org.apache.commons.digester.Digester fatalError
服務(wù)器: Parse Fatal Error at line 423 column 91: The reference to entity "charac
terEncoding" must end with the ';' delimiter.
org.xml.sax.SAXParseException: The reference to entity "characterEncoding" must
end with the ';' delimiter.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
known Source)
所以我將“&”改成了“;”
這到底是為什么?怎么會出現(xiàn)這種現(xiàn)象? |
|