URL中多参数传递+中文乱码问题

在jsp的请求中   都参数且有中文
    window.location=encodeURI('<%=basePath%>admin.do?method=login&adminname='+textname+'&password='+textpassword+'&roleid='+roleid+'');


Action处理

   		String adminname = new String(request.getParameter("adminname").getBytes("ISO-8859-1"),"UTF-8");
		String password = new String(request.getParameter("password").getBytes("ISO-8859-1"),"UTF-8");
		String roleid = URLDecoder.decode(request.getParameter("roleid"), "UTF-8");

你可能感兴趣的:(java,jsp)