public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=utf-8");
PrintWriter pw = response.getWriter();
InputStreamReader insr = new InputStreamReader(request.getInputStream(),"utf-8");
//读取服务器的响应内容并显示
String result = "";
int respInt = insr.read();
//System.out.println(respInt);
while(respInt != -1){
result += (char)respInt;
respInt = insr.read();
}
System.out.println("result:" + result);
JSONObject jsonResult = JSONObject.fromObject(result);
String qrcode=jsonResult.getString("qrcode");
System.out.println("qrcode:"+qrcode);
}