/** * Generates the HTML error page for the given Throwable * and writes it to the given writer. * @param writer * @param faces * @param e * @throws IOException */ public static void debugHtml(Writer writer, FacesContext faces, Throwable e) throws IOException { debugHtml(writer, faces, faces.getViewRoot(), null, e); }
/** * Generates the HTML error page for the given Throwable * and writes it to the given writer. * @param writer * @param faces * @param e * @throws IOException */ public static void debugHtml(Writer writer, FacesContext faces, Throwable e) throws IOException { debugHtml(writer, faces, e, faces.getViewRoot()); }
/** * Generates the HTML error page for the given Throwable * and writes it to the given writer. * @param writer * @param faces * @param e * @throws IOException */ public static void debugHtml(Writer writer, FacesContext faces, Throwable e) throws IOException { debugHtml(writer, faces, e, faces.getViewRoot()); }
@SuppressWarnings("unchecked") private static String writeDebugOutput(FacesContext faces) throws IOException { FastWriter fw = new FastWriter(); ErrorPageWriter.debugHtml(fw, faces); Map<String, Object> session = faces.getExternalContext().getSessionMap(); Map<String, String> debugs = (Map<String, String>) session.get(KEY); if (debugs == null) { debugs = new LinkedHashMap<String, String>() { protected boolean removeEldestEntry(Entry<String, String> eldest) { return (this.size() > 5); } }; session.put(KEY, debugs); } String id = String.valueOf(nextId++); debugs.put(id, fw.toString()); return id; }
@SuppressWarnings("unchecked") private static String writeDebugOutput(FacesContext faces) throws IOException { FastWriter fw = new FastWriter(); ErrorPageWriter.debugHtml(fw, faces); Map<String, Object> session = faces.getExternalContext().getSessionMap(); Map<String, String> debugs = (Map<String, String>) session.get(KEY); if (debugs == null) { debugs = new LinkedHashMap<String, String>() { protected boolean removeEldestEntry(Entry<String, String> eldest) { return (this.size() > 5); } }; session.put(KEY, debugs); } String id = String.valueOf(nextId++); debugs.put(id, fw.toString()); return id; }
@SuppressWarnings("unchecked") private static String writeDebugOutput(FacesContext faces) throws IOException { FastWriter fw = new FastWriter(); ErrorPageWriter.debugHtml(fw, faces); Map<String, Object> session = faces.getExternalContext().getSessionMap(); Map<String, String> debugs = (Map<String, String>) session.get(KEY); if (debugs == null) { debugs = new LinkedHashMap<String, String>() { protected boolean removeEldestEntry(Entry<String, String> eldest) { return (this.size() > 5); } }; session.put(KEY, debugs); } String id = String.valueOf(nextId++); debugs.put(id, fw.toString()); return id; }
debugHtml(writer, facesContext, facesContext.getViewRoot(), components, exs);
debugHtml(writer, facesContext, ex);
debugHtml(writer, facesContext, ex);
debugHtml(writer, facesContext, ex);