continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r434244 - in /maven/continuum/branches/continuum-acegi/continuum-webapp/src/main: resources/localization/Continuum.properties resources/xwork.xml webapp/WEB-INF/web.xml webapp/error.jsp webapp/error/error.jsp
Date Wed, 23 Aug 2006 23:21:56 GMT
Author: carlos
Date: Wed Aug 23 16:21:56 2006
New Revision: 434244

URL: http://svn.apache.org/viewvc?rev=434244&view=rev
Log:
Rework the error handling and allow acegi to deal with authentication and authorization exceptions

Added:
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/error/error.jsp
Removed:
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/error.jsp
Modified:
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/localization/Continuum.properties
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/WEB-INF/web.xml

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=434244&r1=434243&r2=434244&view=diff
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/localization/Continuum.properties
Wed Aug 23 16:21:56 2006
@@ -41,14 +41,6 @@
 menu.administration.users = Users
 
 # ----------------------------------------------------------------------
-# Page: error
-# ----------------------------------------------------------------------
-error.page.title = Error Page
-error.section.title = An Internal Error Has Occurred!
-error.exception.message = Exception Message:
-error.message = The server was not able of performing the request. Please try again later.
Contact the administrator if this problem persists.
-
-# ----------------------------------------------------------------------
 # Page: About
 # ----------------------------------------------------------------------
 about.page.title = Continuum - About
@@ -372,3 +364,17 @@
 role.page.title = Continuum - Roles List
 role.section.title = Roles List
 role.rolename = Roles
+
+
+# ----------------------------------------------------------------------
+# Errors
+# ----------------------------------------------------------------------
+error.page.title = Error
+error.exception.message = Exception Message:
+
+error.403.title = Access is denied
+error.403.detail = Access to the specified resource has been forbidden.
+error.404.title = Page not found
+error.404.detail = The requested resource is not available.
+error.500.title = An Internal Error Has Occurred!
+error.500.detail = The server was not able of performing the request. Please try again later.
Contact the administrator if this problem persists.

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml?rev=434244&r1=434243&r2=434244&view=diff
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml
Wed Aug 23 16:21:56 2006
@@ -7,7 +7,7 @@
     <interceptors>
       <interceptor name="exception-logging" class="exceptionLogging"/>
       <interceptor-stack name="defaultContinuumStack">
-        <interceptor-ref name="exception-acegi"/>
+        <interceptor-ref name="exception-logging"/>
         <interceptor-ref name="prepare"/>
         <interceptor-ref name="servlet-config"/>
         <interceptor-ref name="chain"/>
@@ -26,11 +26,13 @@
 
     <global-results>
       <result name="login" type="redirect">/login.jsp</result>
-      <result name="error">/error.jsp</result>
+      <result name="error-internal">/error/error.jsp?id=500</result>
     </global-results>
 
     <global-exception-mappings>
-      <exception-mapping exception="java.lang.Exception" result="error"/>
+      <exception-mapping exception="java.lang.Exception" result="error-internal"/>
+      <!-- this will be handled by Acegi ExceptionTranslationFilter -->
+      <exception-mapping exception="org.acegisecurity.AcegiSecurityException" result="ignore"/>
     </global-exception-mappings>
 
     <action name="checkConfiguration" class="checkConfiguration">

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/WEB-INF/web.xml?rev=434244&r1=434243&r2=434244&view=diff
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/WEB-INF/web.xml
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/WEB-INF/web.xml
Wed Aug 23 16:21:56 2006
@@ -146,4 +146,18 @@
     <taglib-uri>/tld/extremecomponents</taglib-uri>
     <taglib-location>/WEB-INF/extremecomponents.tld</taglib-location>
   </taglib>
+
+  <error-page>
+    <error-code>403</error-code>
+    <location>/error/error.jsp?id=403</location>
+  </error-page>
+  <error-page>
+    <error-code>404</error-code>
+    <location>/error/error.jsp?id=404</location>
+  </error-page>
+  <error-page>
+    <error-code>500</error-code>
+    <location>/error/error.jsp?id=500</location>
+  </error-page>
+
 </web-app>

Added: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/error/error.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/error/error.jsp?rev=434244&view=auto
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/error/error.jsp
(added)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/error/error.jsp
Wed Aug 23 16:21:56 2006
@@ -0,0 +1,28 @@
+<%@ taglib uri="/webwork" prefix="ww" %>
+<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
+
+<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>
+
+<html>
+<ww:i18n name="localization.Continuum">
+  <head>
+    <title><ww:text name="error.${id}.title"/></title>
+  </head>
+
+  <body>
+  <div id="axial" class="h3">
+    <h3><ww:text name="error.${id}.title"/></h3>
+    <div class="errormessage">
+      <ww:text name="error.${id}.detail"/>
+    </div>
+  </div>
+  </body>
+</ww:i18n>
+</html>



Mime
View raw message