Index: ssts-receiverecord/src/main/java/com/forgon/disinfectsystem/receiverecord/action/ReceiveRecordAction.java =================================================================== diff -u -r13113 -r13117 --- ssts-receiverecord/src/main/java/com/forgon/disinfectsystem/receiverecord/action/ReceiveRecordAction.java (.../ReceiveRecordAction.java) (revision 13113) +++ ssts-receiverecord/src/main/java/com/forgon/disinfectsystem/receiverecord/action/ReceiveRecordAction.java (.../ReceiveRecordAction.java) (revision 13117) @@ -154,18 +154,10 @@ // 加了并发控制 public String saveReceiveRecord() { - HttpServletResponse response = StrutsParamUtils.getResponse(); - PrintWriter out = null; String result = "保存成功"; - response.setCharacterEncoding("UTF-8"); Map returnMsg = new HashMap(); returnMsg.put("success", false); returnMsg.put("message", "保存失败"); - try { - out = response.getWriter(); - } catch (IOException e) { - e.printStackTrace(); - } boolean success = false; try { String id = StrutsParamUtils.getPraramValue("id", ""); @@ -198,7 +190,7 @@ StrutsParamUtils.getResponse().setContentType("text/html;charset=UTF-8"); returnMsg.put("success", success); returnMsg.put("message", result); - StrutsParamUtils.getResponse().getWriter().print(returnMsg); + StrutsParamUtils.getResponse().getWriter().print(JSONObject.fromObject(returnMsg)); } catch (Exception e) { e.printStackTrace(); }