比如配置 web.xml文件的全局初始化参数时,对特殊的&符号就要进行转义:
<context-param>
<param-name>driver</param-name>
<param-value>com.MysqL.jdbc.Driver</param-value>
</context-param>
<context-param>
<param-name>dsn</param-name>
<param-value>jdbc:MysqL://localhost/testDB?user=root&password=root&useUnicode=true&characterEncoding=utf-8</param-value> </context-param>