标签:encoding ring server https tps throw ack htm ret
post: 软编码get:
软编码
1:修改tomcat
conf文件夹下~~~》server.xml line69~~~》
useBodyEncodingForURI="true"
2:硬编码
public void doGet(HttpServletRequest request
,HttpServletResponse response)throws Exception{
String name = request.getParameter("key");
String newName = change(name);
}
public String change(String old){
try{
return new String(old.getBytes("iso-8859-1"),"utf-8");
}catch(Exception ex){
ex.printStackTrace();
return null;
}
}
标签:encoding ring server https tps throw ack htm ret
原文地址:http://blog.51cto.com/12941821/2066043