src/main/java/de/uapcore/lightpit/modules/ErrorModule.java

changeset 34
824d4042c857
parent 29
27a0fdd7bca7
child 40
276ef00a336d
--- a/src/main/java/de/uapcore/lightpit/modules/ErrorModule.java	Sat May 09 15:19:21 2020 +0200
+++ b/src/main/java/de/uapcore/lightpit/modules/ErrorModule.java	Sat May 09 17:01:29 2020 +0200
@@ -1,8 +1,8 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- * 
+ *
  * Copyright 2018 Mike Becker. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
  *
@@ -24,15 +24,12 @@
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
- * 
+ *
  */
 package de.uapcore.lightpit.modules;
 
-import de.uapcore.lightpit.LightPITModule;
-import de.uapcore.lightpit.AbstractLightPITServlet;
-import de.uapcore.lightpit.HttpMethod;
-import de.uapcore.lightpit.RequestMapping;
-import de.uapcore.lightpit.ResponseType;
+import de.uapcore.lightpit.*;
+
 import javax.servlet.annotation.WebServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -51,28 +48,28 @@
         urlPatterns = "/error/*"
 )
 public final class ErrorModule extends AbstractLightPITServlet {
-    
+
     public static final String REQ_ATTR_ERROR_CODE = "errorCode";
-    
+
     private ResponseType handle(HttpServletRequest req, HttpServletResponse resp, int sc) {
-        
+
         req.setAttribute(REQ_ATTR_ERROR_CODE, sc);
         setStylesheet(req, "error");
         setDynamicFragment(req, "error");
-        
+
         return ResponseType.HTML_FULL;
     }
-    
+
     @RequestMapping(requestPath = "404", method = HttpMethod.GET)
     public ResponseType handle404(HttpServletRequest req, HttpServletResponse resp) {
         return handle(req, resp, 404);
     }
-    
+
     @RequestMapping(requestPath = "403", method = HttpMethod.GET)
     public ResponseType handle403(HttpServletRequest req, HttpServletResponse resp) {
         return handle(req, resp, 403);
     }
-    
+
     @RequestMapping(requestPath = "500", method = HttpMethod.GET)
     public ResponseType handle500(HttpServletRequest req, HttpServletResponse resp) {
         return handle(req, resp, 500);

mercurial