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 <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2015-05-18 22:09:11 +01:00
parent 0cdb4b6108
commit 98a1059413
2 changed files with 18 additions and 0 deletions

View File

@ -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>

12
ui/error.jsp Normal file
View File

@ -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>