You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ko...@apache.org on 2015/05/19 18:21:27 UTC
[41/50] [abbrv] git commit: updated refs/heads/CLOUDSTACK-8301 to
8ff9000
ui: add custom error handling page
This makes sure we don't expose CloudStack stacktrace (if any) on the frontend
instead redirect to show an error handling page.
This closes #256
(cherry picked from commit 112cecc2d4e44d032fb57d9794b02fe694122447)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/98a10594
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/98a10594
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/98a10594
Branch: refs/heads/CLOUDSTACK-8301
Commit: 98a1059413a20424351b8169003ec6216a2ce3fb
Parents: 0cdb4b6
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Mon May 18 22:09:11 2015 +0100
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Mon May 18 23:11:59 2015 +0100
----------------------------------------------------------------------
client/WEB-INF/web.xml | 6 ++++++
ui/error.jsp | 12 ++++++++++++
2 files changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/98a10594/client/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/client/WEB-INF/web.xml b/client/WEB-INF/web.xml
index 7ccfc31..a384f06 100644
--- a/client/WEB-INF/web.xml
+++ b/client/WEB-INF/web.xml
@@ -77,4 +77,10 @@
<url-pattern>*.html</url-pattern>
<url-pattern>*.js</url-pattern>
</servlet-mapping>
+
+ <error-page>
+ <exception-type>java.lang.Exception</exception-type>
+ <location>/error.jsp</location>
+ </error-page>
+
</web-app>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/98a10594/ui/error.jsp
----------------------------------------------------------------------
diff --git a/ui/error.jsp b/ui/error.jsp
new file mode 100644
index 0000000..88fdfa1
--- /dev/null
+++ b/ui/error.jsp
@@ -0,0 +1,12 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>Apache CloudStack</title>
+ <link rel="shortcut icon" href="images/cloud.ico" />
+ </head>
+ <body>
+ <p>Oops, looks like CloudStack hit an error. Ask your CloudStack Administrator to look into it.</p>
+ </body>
+</html>