关于request.sendRedirect()返回的问题 页面已经指定了编码方式,不需要再做转换了把两个页面的这句话都去掉再试试request.setCharacterEncoding("GB2312"); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 接收页应该改为:接收页:<%@ page contentType="text/html;charset=GB2312"%><% String s=new String(request.getParameter("name").getBytes("ISO8859-1")); System.out.println(s); response.sendRedirect("send.jsp?name="+s);%> <%@ page contentType="text/html;charset=GB2312"%><% String s=new String(request.getParameter("name").getBytes("ISO8859-1"),"GB2312"); System.out.println(s); response.sendRedirect("send.jsp?name="+s);%> err = URLEncoder.encode("您没有选择任何节目,请正确选择!","gb2312");response.sendRedirect("/cyvod/manage/actinfo.jsp?err="+err);或者:response.sendRedirect("aaa.jsp?param=" + java.net.URLEncoder.encode("中文字符串"));别的方法好像不行的.楼主看看 request.setCharacterEncoding("GB2312");这个是我后加上去的,我测了一下,发现接收页接收的时候是中文的,只有使用response.sendRedirect("send.jsp?name="+s);它转回来的时候,才变成乱码的,也就是说,他被response.sendRedirect()这个方法处理时候就变成乱码了,然后在发回的 感谢:dropship(一个人下棋)马上结贴 求马士兵的BBS2209的源代码及视频,谢谢! Ext2.0 Ext.ux.UploadDialog+struts2 文件上传 FF正常 IE8上传成功后弹出下载框 如何在同一个JSP页面中显示两个相同的树 JS中 如何调用 css 来改变表格样式 宽带怎样限制客户流量 cos做表单内容上传,出现乱码 畫面輸入一個特殊的繁體字符到提交到后天確變成了"峯"怎么回事情﹖ 关于时间的问题.. 谁知道那个图形化的Struts配置工具最好用? 求一段 js 代码? mysql分am、pm时间?怎么20点变成了8点 谁能帮我加入事物处理并且让数据库配置写入一个配置文件中啊,高分
接收页:
<%@ page contentType="text/html;charset=GB2312"%>
<%
String s=new String(request.getParameter("name").getBytes("ISO8859-1"));
System.out.println(s);
response.sendRedirect("send.jsp?name="+s);
%>
<%
String s=new String(request.getParameter("name").getBytes("ISO8859-1"),"GB2312");
System.out.println(s);
response.sendRedirect("send.jsp?name="+s);
%>
response.sendRedirect("/cyvod/manage/actinfo.jsp?err="+err);
或者:
response.sendRedirect("aaa.jsp?param=" + java.net.URLEncoder.encode("中文字符串"));别的方法好像不行的.楼主看看
这个是我后加上去的,我测了一下,发现接收页接收的时候是中文的,只有使用response.sendRedirect("send.jsp?name="+s);
它转回来的时候,才变成乱码的,
也就是说,他被response.sendRedirect()这个方法处理时候就变成乱码了,然后在发回的
dropship(一个人下棋)
马上结贴