diff options
author | 2016-07-07 15:13:47 +0300 | |
---|---|---|
committer | 2016-07-07 15:13:47 +0300 | |
commit | e5c8298beee5dde90ca98cc4707faac4bf0e2f0c (patch) | |
tree | 10178a0103ae8ac17849e56914b87b0ee681d0ba /src/main/java/com/juick/http/www/Errors.java | |
parent | d85424021a63c1519e18bd6518ad3424de61fb9f (diff) |
reorganize project
Diffstat (limited to 'src/main/java/com/juick/http/www/Errors.java')
-rw-r--r-- | src/main/java/com/juick/http/www/Errors.java | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/main/java/com/juick/http/www/Errors.java b/src/main/java/com/juick/http/www/Errors.java deleted file mode 100644 index 0044c209..00000000 --- a/src/main/java/com/juick/http/www/Errors.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.juick.http.www; - -import org.springframework.jdbc.core.JdbcTemplate; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; - -/** - * - * @author ugnich - */ -public class Errors { - - public static String tagsHTML = null; - - public static void doGet404(JdbcTemplate sql, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - com.juick.User visitor = Utils.getVisitorUser(sql, request, response); - - if (tagsHTML == null) { - tagsHTML = PageTemplates.formatPopularTags(sql, 80); - } - - response.setStatus(404); - response.setContentType("text/html; charset=UTF-8"); - try (PrintWriter out = response.getWriter()) { - PageTemplates.pageHead(out, "404 Страница не найдена", null); - PageTemplates.pageNavigation(out, visitor, null); - PageTemplates.pageHomeColumn(out, sql, visitor); - - out.println("<section id=\"content\">"); - out.println("<h1>Страница не найдена</h1>"); - out.println("<p>Сожалеем, но страницу с этим адресом удалил её автор, либо её никогда не существовало.</p>"); - out.println("</section>"); - - PageTemplates.pageFooter(request, out, visitor, false); - PageTemplates.pageEnd(out); - } - } -} |