2024-11-02 11:07:23
2024-11-02 13:00:15
//setContentType啊 认准
response.setContentType("application/json;charset=utf-8");
JSONObject json = JSONObject.fromObject(resultMap);
String jsonStr = json.toString();
response.getWriter().write(jsonStr);
2024-11-02 02:47:59
我有加有啊,还是不得
response.setContentType("text/html;charset=utf-8");
PrintWriter out = response.getWriter();
request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("utf-8");
这几句就是设置编码的,不知道你写全了没
解决了,utf-8改为gbk就行了,应该是Eclipse的设置为gbk的问题,谢谢~