diff --git a/src/main/java/net/Broken/webView/MyErrorController.java b/src/main/java/net/Broken/webView/MyErrorController.java index 8bba1ad..1b323ff 100644 --- a/src/main/java/net/Broken/webView/MyErrorController.java +++ b/src/main/java/net/Broken/webView/MyErrorController.java @@ -30,6 +30,12 @@ public class MyErrorController implements ErrorController { if(statusCode == HttpStatus.NOT_FOUND.value()) { return "error/404"; } + else if(statusCode == HttpStatus.FORBIDDEN.value()){ + return "error/403"; + } + else if(statusCode == HttpStatus.INTERNAL_SERVER_ERROR.value()){ + return "error/500"; + } } return "error"; diff --git a/src/main/resources/static/img/403.webp b/src/main/resources/static/img/403.webp new file mode 100644 index 0000000..4429525 Binary files /dev/null and b/src/main/resources/static/img/403.webp differ diff --git a/src/main/resources/static/img/500.gif b/src/main/resources/static/img/500.gif new file mode 100644 index 0000000..479f2a4 Binary files /dev/null and b/src/main/resources/static/img/500.gif differ diff --git a/src/main/resources/templates/error/403.html b/src/main/resources/templates/error/403.html new file mode 100644 index 0000000..5195bd0 --- /dev/null +++ b/src/main/resources/templates/error/403.html @@ -0,0 +1,87 @@ + + + + + + Claptrap Bot + + + + + + + + + + + + + + + +
...
+ + + + + +
+ +
+
+
+

STOP !

+

Who are you ??? Why are you here ???

+ + + + home + +
403 – Forbidden
+
+
+ +
+
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/error/404.html b/src/main/resources/templates/error/404.html index 3cf38c2..c337710 100644 --- a/src/main/resources/templates/error/404.html +++ b/src/main/resources/templates/error/404.html @@ -31,11 +31,13 @@
-

Oops!

-

Page not found!

+

Oops !

+

You are lost !

+

Page not found !

home +
404 – Not Found
diff --git a/src/main/resources/templates/error/500.html b/src/main/resources/templates/error/500.html new file mode 100644 index 0000000..ac44c8b --- /dev/null +++ b/src/main/resources/templates/error/500.html @@ -0,0 +1,84 @@ + + + + + + Claptrap Bot + + + + + + + + + + + + + + + +
...
+ + + + + +
+ +
+
+
+

Well...

+

Something was wrong with the server...

+

+ + + home + +
500 – Internal Server Error
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + +