jsp页面:
$.ajax({ type:'POST',url:"../user/userInfoExportExcel?org.orgId="+org_id+"&user.uesrName="+encodeURI(encodeURI(user_name)),success:function(json){ var Json = eval("(" + json.jsonResult + ")"); if(Json.result!="fail"){ window.location.href="../orgtree/exportExcel.action?fileName="+Json.result; ajaxbg.hide(); }else{ alertMsg.error('导出失败!'); ajaxbg.hide(); } } });
java后台:
if (getParameterValue("user.uesrName") != null && !getParameterValue("user.uesrName").equals("")) { String decodeUserName = java.net.URLDecoder.decode((String)getParameterValue("user.uesrName"),"utf-8"); c.andUserNameLike("%" + decodeUserName.trim() + "%"); }