json シンプル ライブラリhereを使用して json データを作成しています
これでコードは正常に実行され、出力を取得できます。コードは -
<%@page contentType="application/json" pageEncoding="UTF-8"
import="org.json.simple.JSONObject"%>
<%
JSONObject json = new JSONObject();
newa.NewClass1 newca = new newa.NewClass1();
try {
String s_id = session.getAttribute("id").toString();
json.put("count", newca.get_update_count(s_id) );
} catch (Exception e) { json.put("count", "0" ); }
out.println(json);
json.clear();
out.flush();
out.close();
%>
ページにアクセスするたびに、サーバーログに警告が表示されます-
WARNING: Internal error flushing the buffer in release()
コードで out.flush を使用したため、バッファをフラッシュするにはどうすればよいですか。
よろしく