javaweb get跟post 乱码解决

get中把tomact中的servel.xml 中 content 加上 URIEncoding="UTF-8"跟 useBodyEncodingForURL="true"

post传中文 String name = new String((request.getParameter("name")).getBytes("ISO-8859-1"),"UTF-8");

新手

原文地址:https://www.cnblogs.com/xinboke/p/6902926.html