boolean jsonP = false; String cb = request.getParameter("callback"); if (cb !=null) { jsonP true response.setContentType("text/javascript"}else.setContentType("application/x-json"Writerout.getWriter();jsonPout.write+ "(".printdataBlock.toJsonString());");"}原文链接:https://www.f2er.com/json/289523.html