diff options
author | 2015-10-24 19:35:41 +0300 | |
---|---|---|
committer | 2015-10-24 19:35:41 +0300 | |
commit | af80956ec669cf48ea6423959b5a4d8f16385d6f (patch) | |
tree | 3589c77814185cd8bf43408f46793aaf8917c27a /src/java/com/juick/http/www/Errors.java | |
parent | 7a96f3f799e2e2358be246b3e9f0aa412ef28a2d (diff) |
moving to Gradle
Diffstat (limited to 'src/java/com/juick/http/www/Errors.java')
-rw-r--r-- | src/java/com/juick/http/www/Errors.java | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/java/com/juick/http/www/Errors.java b/src/java/com/juick/http/www/Errors.java deleted file mode 100644 index f65b6201..00000000 --- a/src/java/com/juick/http/www/Errors.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.juick.http.www; - -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.Connection; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * - * @author ugnich - */ -public class Errors { - - public static String tagsHTML = null; - - public static void doGet404(Connection sql, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - com.juick.User visitor = Utils.getVisitorUser(sql, request, response); - - if (tagsHTML == null) { - tagsHTML = PageTemplates.getPopularTags(sql, 80); - } - - response.setStatus(404); - response.setContentType("text/html; charset=UTF-8"); - PrintWriter out = response.getWriter(); - try { - 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); - } finally { - out.close(); - } - } -} |