示例1:
//万能,但麻烦 uname = new String (uname.getBytes("iso8859-1"),"utf-8"); //使用String进行重新编码
post方式 示例2:
req.setCharacterEncoding("utf-8"); //post好使,get不好使 //因为:get的用户请求数据在url中
get方式 示例3: 步骤一:
req.setCharacterEncoding("utf-8");
步骤二:修改server.xml文件