servlet返回json字符串
public static void write(HttpServletResponse response,Object o)throws Exception{
response.setContentType("text/html;charset=utf-8");
PrintWriter out=response.getWriter();
JSONObject responseJSONObject = JSONObject.fromObject(o); //
out.println(responseJSONObject.toString());
out.flush();
out.close();
}