URL传参乱码

跳转前使用:encodeURI(keyValue);

跳转后页面接受的话使用:

 <%@page import="java.net.URLDecoder"%>
<%
String keyValue= request.getParameter("keyValue");
keyValue= URLDecoder.decode(keyValue,"utf8");
%> 

跳转后后天接收:

Java: keywords = java.net.URLDecoder.decode(request.getParameter("keyValue"), "UTF-8");

            keywords = new String(keywords.getBytes("iso-8859-1"), "utf-8");

 

 

 

 

/product/devicemanager/searchengine/SearchIndex.jsp#openWindow#

 

你可能感兴趣的:(url传参乱码)