1.你看看你的mysql 变量中 default-character-set 是否已经是你要的 GB2312
2.jsp 页面中有 <%@ page contentType="text/html; charset=gbk" language="java"%> 就可以了(注意不是<%@ page contentType="text/html; charset=gbk" %>)
3.mysql 的连接应该这样比较好
jdbc:mysql://localhost:3306/mytest?useUnicode=true&characterEncoding=GBK&autoReconnect=true做到这3点应该就没问题了,我的在windows linux 下 tomcat ,resin 下都没问题。
2.jsp 页面中有 <%@ page contentType="text/html; charset=gbk" language="java"%> 就可以了(注意不是<%@ page contentType="text/html; charset=gbk" %>)
3.mysql 的连接应该这样比较好
jdbc:mysql://localhost:3306/mytest?useUnicode=true&characterEncoding=GBK&autoReconnect=true做到这3点应该就没问题了,我的在windows linux 下 tomcat ,resin 下都没问题。
解决方案 »
- JACOB操作word 报错 VariantChangeType failed
- [新手求助]关于Spring的错误。org.springframework.beans.factory.BeanCreationException
- 应用系统正在运行的表现特征
- 菜鸟请教:为什么要使用接口,接口的优点在哪里?!!
- 如何将Form内变量的值赋给JSP页面中的变量?
- apache的问题,请指教
- 一个ejb-ql的问题
- 在web应用中怎么用jms向指定的页面传递消息???
- 学习struts的web.xml配置中参数的意思
- 我用jbuilder7 F9 Ejb时,报下列错误,谁知道为什么???????
- hibernate报错,大家帮我排查一下呀!
- struts+ajax出现中文乱码问题?
查询异常也已解决
谢谢楼上回复!!