首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

两jsp间传递中文参数乱码有关问题

2012-09-08 
两jsp间传递中文参数乱码问题a.jsp??? response.sendRedirect(error.jsp?errmsg+URLEncoder.encode(转

两jsp间传递中文参数乱码问题

a.jsp??? response.sendRedirect("error.jsp?errmsg="+URLEncoder.encode("转换结果为空!","UTF-8"));

b.jsp??? <%=new String(request.getParameter("errmsg").getBytes("ISO-8859-1"),"UTF-8")%>

如上写法可解决乱码问题

热点排行