/** * Output 404 with appropriate message. * @param resp the http response. * @param message the message to include on the page. * @throws IOException on any error. */ public static void notFound(HttpServletResponse resp, String message) throws IOException { resp.setStatus(HttpServletResponse.SC_NOT_FOUND); resp.setContentType(MimeType.HTML); Page p = new Page(resp.getWriter()); p.html(). h1(message). _(); }
/** * Output 404 with appropriate message. * @param resp the http response. * @param message the message to include on the page. * @throws IOException on any error. */ public static void notFound(HttpServletResponse resp, String message) throws IOException { resp.setStatus(HttpServletResponse.SC_NOT_FOUND); resp.setContentType(MimeType.HTML); Page p = new Page(resp.getWriter()); p.html(). h1(message). _(); }
/** * Output 404 with appropriate message. * @param resp the http response. * @param message the message to include on the page. * @throws IOException on any error. */ public static void notFound(HttpServletResponse resp, String message) throws IOException { resp.setStatus(HttpServletResponse.SC_NOT_FOUND); resp.setContentType(MimeType.HTML); Page p = new Page(resp.getWriter()); p.html(). h1(message). __(); }
PrintWriter writer = response.getWriter(); Page p = new Page(writer); p.html() .head().title("Moved")._() .body()
PrintWriter writer = response.getWriter(); Page p = new Page(writer); p.html() .head().title("Moved")._() .body()
PrintWriter writer = response.getWriter(); Page p = new Page(writer); p.html() .head().title("Moved").__() .body()
PrintWriter writer = response.getWriter(); Page p = new Page(writer); p.html() .head().title("Moved")._() .body()
/** * Output 404 with appropriate message. * @param resp the http response. * @param message the message to include on the page. * @throws IOException on any error. */ public static void notFound(HttpServletResponse resp, String message) throws IOException { resp.setStatus(HttpServletResponse.SC_NOT_FOUND); resp.setContentType(MimeType.HTML); Page p = new Page(resp.getWriter()); p.html(). h1(message). _(); }