有关jsp中的response.sendRedirect()中文参数的问题
2006-04-24 09:35
330 查看
求助:有关jsp中的response.sendRedirect()的问题???
我在jsp中使用了下面这句:
response.sendRedirect("test.jsp?name=姓名&pwd=1111") ;
但,在test.jsp中获取参数时,pwd可以正常获得,而name
获得的是乱码。
然后我在这之前加了:
response.setContentType("text/html;charset=gb2312");
还试过其他一些有关中文乱码的解决方法,都失败。
请教高手指点了,先谢了。
解决:
String sURL="test.jsp?name=姓名&pwd=1111";
sURL=new String(sURL.getBytes("GBK"),"ISO8859_1");
response.sendRedirect(sURL);
我在jsp中使用了下面这句:
response.sendRedirect("test.jsp?name=姓名&pwd=1111") ;
但,在test.jsp中获取参数时,pwd可以正常获得,而name
获得的是乱码。
然后我在这之前加了:
response.setContentType("text/html;charset=gb2312");
还试过其他一些有关中文乱码的解决方法,都失败。
请教高手指点了,先谢了。
解决:
String sURL="test.jsp?name=姓名&pwd=1111";
sURL=new String(sURL.getBytes("GBK"),"ISO8859_1");
response.sendRedirect(sURL);
相关文章推荐
- jsp中response.sendRedirect()的中文参数乱码问题
- jsp中response.sendRedirect()中文参数乱码问题
- jsp中response.sendRedirect()中文参数乱码问题
- JSP的response.sendRedirect()中文参数问题
- jsp中response.sendRedirect()中文参数乱码问题
- jsp中获取当前页的url & response.sendRedirect(url)参数过长及乱码问题
- response.sendRedirect(url)参数过长和中文乱码问题。
- jsp中获取当前页的url & response.sendRedirect(url)参数过长及乱码问题
- 有关jsp中的response.sendRedirect()的问题???
- 有关jsp中的response.sendRedirect()的问题
- jsp中使用response.sendRedirect重定向页面传递中文参数
- response.sendRedirect无法传递中文参数的问题
- 【疑问】如何在jsp中response.sendRedirect()方法中传递中文参数
- jsp 的页面 转换几个小问题response.sendRedirect
- 关于response.sendRedirect传递中文出现乱码问题的解决方案
- response.sendRedirect 传递参数的问题
- response.sendRedirect传递中文参数
- jsp的response.sendRedirect()与request.getRequestDispatcher()关于路径跳转的问题
- response.sendRedirect 传递参数的问题
- response.sendRedirect 传递参数可能出现的问题(乱码、地址映射出错)