/**
* 页面输出json
* @param json
*/
protected void writeJson(String json){
response.setContentType("application/json;charset=UTF-8");
response.setCharacterEncoding("UTF-8");
response.setHeader("Cache-Control", "no-cache");// 清除缓存
PrintWriter pw = null;
try{
pw = response.getWriter();
pw.write(json);
pw.flush();
pw.close();
}catch (Exception e) {
log_.error("write 写json失败..."+e);
if(pw != null){
pw.close();
}
}
}