1、先在js中进行编码
var str = $("mytext").val(); //转码,两次 str = encodeURI(str); str = encodeURI(str); window.location = 'admin/reportQueryExcel.do?ruleText='+str;
URLDecoder.decode(request.getParameter("ruleText"),"utf-8");