从页面跳转:
encodeURI(encodeURI(url));
获取值后<%=URLDecoder.decode(request.getParameter("custName"),"UTF-8")%>
从后台跳转:
response.sendRedirect(url);需要对单个中文参数URLEncoder.encode(accountName,"utf-8")
如:String url = "http://127.0.0.1:8080?a=1$accountName="+URLEncoder.encode(accountName,"utf-8");
获取值后<%=URLDecoder.decode(request.getParameter("custName"),"UTF-8")%>