Clean up error pages.
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 29 Jan 2008 06:55:17 +0000 (06:55 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 29 Jan 2008 06:55:17 +0000 (06:55 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2603 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

resources/WEB-INF/web.xml
resources/webpages/error.jsp [new file with mode: 0644]
resources/webpages/idp-404.jsp [deleted file]
resources/webpages/idp-exception.jsp [deleted file]

index 475882c..e50f605 100644 (file)
     
     <error-page>
         <error-code>500</error-code>
-        <location>/idp-exception.jsp</location>
+        <location>/error.jsp</location>
     </error-page>
     
     <error-page>
         <error-code>404</error-code>
-        <location>/idp-404.jsp</location>
+        <location>/error.jsp</location>
     </error-page>
 
 <!-- Uncomment to use container managed authentication -->
diff --git a/resources/webpages/error.jsp b/resources/webpages/error.jsp
new file mode 100644 (file)
index 0000000..2ffb424
--- /dev/null
@@ -0,0 +1,21 @@
+<%@page import="edu.internet2.middleware.shibboleth.common.profile.AbstractErrorHandler"%>
+
+<html>
+
+<body>
+       <img src="<%= request.getContextPath() %>/images/logo.jpg" />
+       <h3>ERROR</h3>
+       <p>
+           An error occurred while processing your request.  Please contact your helpdesk or
+           user ID office for assistance.
+       </p>
+       <% 
+       Throwable error = (Throwable) request.getAttribute(AbstractErrorHandler.ERROR_KEY);
+          if(error != null){
+       %>
+       <strong>Error Message: <%= error.getMessage() %></strong>
+       <% } %>
+       
+</body>
+
+</html>
\ No newline at end of file
diff --git a/resources/webpages/idp-404.jsp b/resources/webpages/idp-404.jsp
deleted file mode 100644 (file)
index cf9f54d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-
-<body>
-       <img src="<%= request.getContextPath() %>/images/logo.jpg" />
-       <h3>ERROR</h3>
-       Error Message: Invalid identity provider profile URL.
-       
-</body>
-
-</html>
\ No newline at end of file
diff --git a/resources/webpages/idp-exception.jsp b/resources/webpages/idp-exception.jsp
deleted file mode 100644 (file)
index d199d7b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-
-<body>
-       <img src="<%= request.getContextPath() %>/images/logo.jpg" />
-       <h3>ERROR</h3>
-       Error Message: The identity provider encountered an internal error.
-       
-</body>
-
-</html>
\ No newline at end of file