url 带参 传递中文 乱码

JSP: (此页面已定义为  <%@ page language="java" pageEncoding="UTF-8"%> )

URL=action + "?name="+encodeURI(encodeURI(name));

Java获取

Stirng name=request.getParameter("name");
name=URLDecoder.decode(name,"utf-8");
//name=new String(name.getBytes("ISO-8859-1"),"UTF-8");


你可能感兴趣的:(url 带参 传递中文 乱码)