Home > Database > Mysql Tutorial > body text

ext+servlet+mysql编码问题!!彻底崩了

WBOY
Release: 2016-06-06 09:39:08
Original
1055 people have browsed it

编码mysqlservletext

ext+servlet+mysql 的一个管理系统
现在情况是

1. 用户登录到jsp 在文本框输入的参数, a = Ext.getCmp("XXX").getValue()获取不到 a永远为空""
(getCmp("XXX")成功,获取到了该组件,只是getValue为空)
2. 前台直接设置var a = "哈哈" 后台用b =getParameter("XXX")接收成功,输出 b="哈哈"
3. 后台sql 语句查询 sql= "select * from table wherename = '" +b+"'" 结果为空
(但复制System.out.println(""+sql)的sql语句去数据库直接查询是有结果的)
4. 数据库查询出来的数据能争取传到后台也能传到前台

代码问题绝对排除。。。已经被编码弄疯了。最开始把所有设置成UTF-8不行
后来又都设成GBK 更崩。。
求教一下整个mysql到前台到后台的编码设置方法。。平台是Myeclipse 9
自己弄了三天了没弄明白 谢谢了。。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template