[jboss-cvs] JBossAS SVN: r80598 - in trunk/varia/src/resources/jmx: html and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Nov 6 12:02:22 EST 2008
Author: fjuma
Date: 2008-11-06 12:02:22 -0500 (Thu, 06 Nov 2008)
New Revision: 80598
Added:
trunk/varia/src/resources/jmx/html/genericError.jsp
Modified:
trunk/varia/src/resources/jmx/jmx-console-web.xml
Log:
JBAS-5657: 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. This is the same behaviour that was
implemented for JBPAPP-529.
Added: trunk/varia/src/resources/jmx/html/genericError.jsp
===================================================================
--- trunk/varia/src/resources/jmx/html/genericError.jsp (rev 0)
+++ trunk/varia/src/resources/jmx/html/genericError.jsp 2008-11-06 17:02:22 UTC (rev 80598)
@@ -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: trunk/varia/src/resources/jmx/jmx-console-web.xml
===================================================================
--- trunk/varia/src/resources/jmx/jmx-console-web.xml 2008-11-06 16:28:12 UTC (rev 80597)
+++ trunk/varia/src/resources/jmx/jmx-console-web.xml 2008-11-06 17:02:22 UTC (rev 80598)
@@ -78,6 +78,13 @@
<url-pattern>/DisplayOpResult</url-pattern>
</servlet-mapping>
+ <!-- Display a generic error page when HTTP Status 500 exceptions
+ occur. -->
+ <error-page>
+ <error-code>500</error-code>
+ <location>/genericError.jsp</location>
+ </error-page>
+
<!-- A security constraint that restricts access to the HTML JMX console
to users with the role JBossAdmin. Edit the roles to what you want and
uncomment the WEB-INF/jboss-web.xml/security-domain element to enable
More information about the jboss-cvs-commits
mailing list