[jboss-cvs] JBossAS SVN: r80564 - in branches/JBPAPP_4_2_0_GA_CP/varia/src/resources/jmx: html and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Nov 5 16:02:00 EST 2008


Author: fjuma
Date: 2008-11-05 16:02:00 -0500 (Wed, 05 Nov 2008)
New Revision: 80564

Added:
   branches/JBPAPP_4_2_0_GA_CP/varia/src/resources/jmx/html/genericError.jsp
Modified:
   branches/JBPAPP_4_2_0_GA_CP/varia/src/resources/jmx/jmx-console-web.xml
Log:
JBPAPP-529: Created a generic error page for the JMX console that gets
displayed whenever HTTP Status 500 exceptions occur. The error page does not
expose the details of the error.


Added: branches/JBPAPP_4_2_0_GA_CP/varia/src/resources/jmx/html/genericError.jsp
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/varia/src/resources/jmx/html/genericError.jsp	                        (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/varia/src/resources/jmx/html/genericError.jsp	2008-11-05 21:02:00 UTC (rev 80564)
@@ -0,0 +1,39 @@
+<%-- A simple error page. --%>
+
+<%@ page import="org.apache.catalina.util.ServerInfo, 
+                 org.apache.catalina.valves.Constants, 
+                 org.apache.catalina.util.StringManager" %>
+<%@ page isErrorPage="true" %>
+
+<html>
+    <head>
+        <style>
+            <!--H1 {font-family:Tahoma, Arial, sans-serif; color:white; 
+                    background-color:#525D76; font-size:22px;} 
+                H3 {font-family:Tahoma, Arial, sans-serif; color:white; 
+                    background-color:#525D76; font-size:14px;}  
+                HR {color:#525D76;} 
+                .errorText {font-family:Tahoma, Arial, sans-serif; font-size:16px; } -->
+        </style>
+        <title>
+        <%
+            StringManager sm = StringManager.getManager(Constants.Package);
+            out.println(ServerInfo.getServerInfo() + " - " 
+                        + sm.getString("errorReportValve.errorReport")); 
+        %>
+        </title>
+    </head>
+    <body>
+        <h1>
+        <% 
+            out.println(sm.getString("errorReportValve.statusHeader",
+                        "" + pageContext.getErrorData().getStatusCode(), "")); 
+        %>
+        </h1>
+        <hr size=\"1\" noshade=\"noshade\">
+        <span class="errorText">An error has occurred.</span>
+        <hr size=\"1\" noshade=\"noshade\">
+        <h3><%= ServerInfo.getServerInfo() %></h3>
+    </body>
+</html>
+

Modified: branches/JBPAPP_4_2_0_GA_CP/varia/src/resources/jmx/jmx-console-web.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/varia/src/resources/jmx/jmx-console-web.xml	2008-11-05 20:02:12 UTC (rev 80563)
+++ branches/JBPAPP_4_2_0_GA_CP/varia/src/resources/jmx/jmx-console-web.xml	2008-11-05 21:02:00 UTC (rev 80564)
@@ -113,4 +113,12 @@
    <security-role>
       <role-name>JBossAdmin</role-name>
    </security-role>
+
+   <!-- Display a generic error page when HTTP Status 500 exceptions
+        occur. --> 
+   <error-page>
+      <error-code>500</error-code>
+      <location>/genericError.jsp</location>
+   </error-page>
+
 </web-app>




More information about the jboss-cvs-commits mailing list