You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ev...@apache.org on 2009/05/27 07:05:51 UTC

svn commit: r778999 - in /continuum/trunk/continuum-webapp/src/main: java/org/apache/continuum/web/action/error/ resources/ webapp/ webapp/WEB-INF/ webapp/WEB-INF/jsp/error/

Author: evenisse
Date: Wed May 27 05:05:50 2009
New Revision: 778999

URL: http://svn.apache.org/viewvc?rev=778999&view=rev
Log:
[CONTINUUM-2205] Fix NPE on httpError page
merge 778997:778998 from continuum-1.3.x branch

Added:
    continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/error/
      - copied from r778998, continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/error/
    continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/error/HttpError.java
      - copied unchanged from r778998, continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/error/HttpError.java
    continuum/trunk/continuum-webapp/src/main/webapp/httpError.jsp
      - copied unchanged from r778998, continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/httpError.jsp
Modified:
    continuum/trunk/continuum-webapp/src/main/resources/struts.xml
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/error/httpError.jsp
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml

Modified: continuum/trunk/continuum-webapp/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/struts.xml?rev=778999&r1=778998&r2=778999&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/struts.xml (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/struts.xml Wed May 27 05:05:50 2009
@@ -164,11 +164,14 @@
       <result type="redirect-action">groupSummary</result>
     </action>
 
+    <action name="httpError" class="httpError">
+      <result name="success">/WEB-INF/jsp/error/httpError.jsp</result>
+    </action>
+
     <action name="about" class="about">
       <result name="success">/WEB-INF/jsp/about.jsp</result>
     </action>
 
-
     <action name="companyInfo" class="companyInfo">
       <result name="success">/WEB-INF/jsp/components/companyLogo.jsp</result>
       <interceptor-ref name="basicStack" />

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/error/httpError.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/error/httpError.jsp?rev=778999&r1=778998&r2=778999&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/error/httpError.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/error/httpError.jsp Wed May 27 05:05:50 2009
@@ -33,79 +33,52 @@
       <c:when test="${param.errorCode == 404}">
         <s:text name="error.404.title"/>
       </c:when>
-      <c:when test="${param.errorCode == 405}">
-        <s:text name="error.405.title"/>
+      <c:when test="${param.errorCode == 500}">
+        <s:text name="error.500.title"/>
       </c:when>
       <c:otherwise>
         <s:text name="error.page.title"/>
       </c:otherwise>
     </c:choose>
   </title>
-  <link rel="stylesheet" type="text/css" href="<s:url value="/css/tigris.css" includeParams="none"/>" media="screen"/>
-  <link rel="stylesheet" type="text/css" href="<s:url value="/css/print.css" includeParams="none"/>" media="print"/>
-  <link rel="stylesheet" type="text/css" href="<s:url value="/css/extremecomponents.css" includeParams="none"/>" media="screen"/>
-  <link rel="shortcut icon" href="<s:url value="/favicon.ico" includeParams="none"/>" type="image/x-icon"/>
-
-  <script src="<s:url value="/scripts/tigris.js" includeParams="none"/>" type="text/javascript"></script>
 </head>
 
-<body onload="focus()" marginwidth="0" marginheight="0" class="composite">
-<s:include value="/WEB-INF/jsp/navigations/DefaultTop.jsp"/>
-
-<table id="main" border="0" cellpadding="4" cellspacing="0" width="100%">
-  <tbody>
-    <tr valign="top">
-      <td id="leftcol" width="180">
-        <br/> <br/>
-        <s:include value="/WEB-INF/jsp/navigations/Menu.jsp"/>
-      </td>
-      <td width="86%">
-        <br/>
-
-        <div id="bodycol">
-          <div class="app">
-            <div id="axial" class="h3">
-              <h3>
-                <c:choose>
-                  <c:when test="${param.errorCode == 403}">
-                    <s:text name="error.403.section.title"/>
-                  </c:when>
-                  <c:when test="${param.errorCode == 404}">
-                    <s:text name="error.404.section.title"/>
-                  </c:when>
-                  <c:when test="${param.errorCode == 405}">
-                    <s:text name="error.405.section.title"/>
-                  </c:when>
-                  <c:otherwise>
-                    The URL requested results to an unknown error.
-                  </c:otherwise>
-                </c:choose>
-              </h3>
+<body>
+  <div id="h3">
+    <h3>
+      <c:choose>
+        <c:when test="${param.errorCode == 403}">
+          <s:text name="error.403.section.title"/>
+        </c:when>
+        <c:when test="${param.errorCode == 404}">
+          <s:text name="error.404.section.title"/>
+        </c:when>
+        <c:when test="${param.errorCode == 500}">
+          <s:text name="error.500.section.title"/>
+        </c:when>
+        <c:otherwise>
+          The URL requested results to an unknown error (Error <s:property value="errorCode"/>).
+        </c:otherwise>
+      </c:choose>
+    </h3>
 
-              <div class="errormessage">
-                <c:choose>
-                  <c:when test="${param.errorCode == 403}">
-                    <s:text name="error.403.message"/>
-                  </c:when>
-                  <c:when test="${param.errorCode == 404}">
-                    <s:text name="error.404.message"/>
-                  </c:when>
-                  <c:when test="${param.errorCode == 405}">
-                    <s:text name="error.405.message"/>
-                  </c:when>
-                  <c:otherwise>
-                    The URL requested results to an unknown error.
-                  </c:otherwise>
-                </c:choose>
-              </div>
-            </div>
-          </div>
-        </div>
-      </td>
-    </tr>
-  </tbody>
-</table>
-<s:include value="/WEB-INF/jsp/navigations/DefaultBottom.jsp"/>
+    <div class="errormessage">
+      <c:choose>
+        <c:when test="${param.errorCode == 403}">
+          <s:text name="error.403.message"/>
+        </c:when>
+        <c:when test="${param.errorCode == 404}">
+          <s:text name="error.404.message"/>
+        </c:when>
+        <c:when test="${param.errorCode == 500}">
+          <s:text name="error.500.message"/>
+        </c:when>
+        <c:otherwise>
+          The URL requested results to an unknown error (Error <s:property value="errorCode"/>).
+        </c:otherwise>
+      </c:choose>
+    </div>
+  </div>
 </body>
 </html>
 </s:i18n>
\ No newline at end of file

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml?rev=778999&r1=778998&r2=778999&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml Wed May 27 05:05:50 2009
@@ -138,15 +138,15 @@
   
   <error-page>
     <error-code>403</error-code>
-    <location>/WEB-INF/jsp/error/httpError.jsp?errorCode=403</location>
+    <location>/httpError.jsp?errorCode=403</location>
   </error-page>
   <error-page>
     <error-code>404</error-code>
-    <location>/WEB-INF/jsp/error/httpError.jsp?errorCode=404</location>
+    <location>/httpError.jsp?errorCode=404</location>
   </error-page>
   <error-page>
     <error-code>500</error-code>
-    <location>/WEB-INF/jsp/error/httpError.jsp?errorCode=500</location>
+    <location>/httpError.jsp?errorCode=500</location>
   </error-page>
 
   <!-- [jspc-maven-plugin:post-compiled-jsps-as-servlets] -->