ResponseWriter writer = faces.getResponseWriter();
writer.write(sb.toString());
}
private static String writeDebugOutput(FacesContext faces) throws IOException {
FastWriter fw = new FastWriter();
DevTools.debugHtml(fw, faces);
Map session = faces.getExternalContext().getSessionMap();
Map debugs = (Map) session.get(KEY);
if (debugs == null) {
debugs = new LinkedHashMap() {
protected boolean removeEldestEntry(Map.Entry eldest) {
return (this.size() > 5);
}
};
session.put(KEY, debugs);
}
String id = "" + nextId++;
debugs.put(id, fw.toString());
return id;
}