從jsp傳遞“段子”過(guò)去,與數(shù)據(jù)庫(kù)比較時(shí),卻是亂碼,請(qǐng)問(wèn)怎么解決?
錯(cuò)誤信息如下:
### 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文件中找到鏈接數(shù)據(jù)庫(kù)的屬性,指定數(shù)據(jù)庫(kù)編碼解析為utf-8。