從jsp傳遞“段子”過去,與數據庫比較時,卻是亂碼,請問怎么解決?
錯誤信息如下:
### Error querying database.? Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE? cod.name='??μ?-?'? ? ? and cod.DESCRIPTION like '%' '??μ?-?' at line 12
2018-08-21
在總的配置文件configuration。xml文件中找到鏈接數據庫的屬性,指定數據庫編碼解析為utf-8。