[JSP]请教在jsp中如何利用request.getParameter传递中文 在线等待

[复制链接]
查看11 | 回复3 | 2013-8-22 10:00:10 | 显示全部楼层 |阅读模式
我用request.getParameter传递英文没有问题,但是在传递中文就会出现乱码,请高手指点如何解决。
每个jsp页面都用了
回复

使用道具 举报

千问 | 2013-8-22 10:00:10 | 显示全部楼层
username = new String(request.getParameter("username&quot

.getBytes("ISO8859-1&quot

);
回复

使用道具 举报

千问 | 2013-8-22 10:00:10 | 显示全部楼层
request.setCharacterEncoding(GBK);
回复

使用道具 举报

千问 | 2013-8-22 10:00:10 | 显示全部楼层
中文可以显示吗?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行