continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r486208 - in /maven/continuum/trunk/continuum-webapp/src/main: resources/xwork.xml webapp/WEB-INF/jsp/error/error.jsp webapp/WEB-INF/web.xml
Date Tue, 12 Dec 2006 16:05:08 GMT
Author: evenisse
Date: Tue Dec 12 08:05:07 2006
New Revision: 486208

URL: http://svn.apache.org/viewvc?view=rev&rev=486208
Log:
Add exception message and stacktrace in error.jsp

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/error/error.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?view=diff&rev=486208&r1=486207&r2=486208
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Tue Dec 12 08:05:07
2006
@@ -117,6 +117,8 @@
       <!-- TODO: this is missing
             <exception-mapping exception="java.lang.Exception" result="error-internal"/>
       -->
+      <exception-mapping exception="java.lang.Exception"
+                         result="error"/>
     </global-exception-mappings>
 
     <!-- This is the redirection facility for plexus-security,

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/error/error.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/error/error.jsp?view=diff&rev=486208&r1=486207&r2=486208
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/error/error.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/error/error.jsp Tue
Dec 12 08:05:07 2006
@@ -1,28 +1,71 @@
-<%@ taglib uri="/webwork" prefix="ww" %>
-<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
+<%--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  --%>
 
-<c:choose>
-  <c:when test="${empty param.id}">
-    <c:set var="id" value="unknown"/>
-  </c:when>
-  <c:otherwise>
-    <c:set var="id" value="${param.id}"/>
-  </c:otherwise>
-</c:choose>
+<%@ taglib prefix="ww" uri="/webwork" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 
 <html>
-<ww:i18n name="localization.MavenUser">
-  <head>
-    <title><ww:text name="error.${id}.title"/></title>
-  </head>
+<head>
+  <title>Error Occurred</title>
+  <ww:head />
+  <script language=javascript type='text/javascript'>
+    <!--
+    var state = 'none';
+    
+    function showhide(layer_ref)
+    {
+      if (state == 'block')
+      {
+        state = 'none';
+      }
+      else
+      {
+        state = 'block';
+      }
+      if (document.all)
+      { //IS IE 4 or 5 (or 6 beta)
+        eval( "document.all." + layer_ref + ".style.display = state");
+      }
+      if (document.layers)
+      { //IS NETSCAPE 4 or below
+        document.layers[layer_ref].display = state;
+      }
+      if (document.getElementById &&!document.all)
+      {
+        hza = document.getElementById(layer_ref);
+        hza.style.display = state;
+      }
+    }
+    -->
+  </script>
+</head>
+
+<body>
+  <div id="h3">
+    <h3>Error Occurred</h3>
 
-  <body>
-  <div id="axial" class="h3">
-    <h3><ww:text name="error.${id}.title"/></h3>
     <div class="errormessage">
-      <ww:text name="error.${id}.detail"/>
+      <ww:property value="exception"/>
+    </div>
+    <p><a href="#" onclick="showhide('stacktrace');">Show/hide Stack Trace</a></p>
+    <div id="stacktrace" style="display: none;">
+      <pre>
+        <ww:property value="exceptionStack"/>
+      </pre>
     </div>
   </div>
-  </body>
-</ww:i18n>
+</body>
 </html>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml?view=diff&rev=486208&r1=486207&r2=486208
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml Tue Dec 12 08:05:07
2006
@@ -52,17 +52,4 @@
 
   <!-- [jspc-maven-plugin:post-compiled-jsps-as-servlets] -->
 
-  <error-page>
-    <error-code>403</error-code>
-    <location>/WEB-INF/jsp/error/error.jsp?id=403</location>
-  </error-page>
-  <error-page>
-    <error-code>404</error-code>
-    <location>/WEB-INF/jsp/error/error.jsp?id=404</location>
-  </error-page>
-  <error-page>
-    <error-code>500</error-code>
-    <location>/WEB-INF/jsp/error/error.jsp?id=500</location>
-  </error-page>
-
 </web-app>



Mime
View raw message