You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Ted Husted (JIRA)" <ji...@apache.org> on 2006/06/13 02:51:16 UTC

[jira] Resolved: (WW-598) Add ability to map exceptions to pages (or actions)

     [ http://issues.apache.org/struts/browse/WW-598?page=all ]
     
Ted Husted resolved WW-598:
---------------------------

    Fix Version: WW 2.2.1
                     (was: 2.0.0)
     Resolution: Fixed

This report is resolved by the exception handlers in WW 2.2. 


> Add ability to map exceptions to pages (or actions)
> ---------------------------------------------------
>
>          Key: WW-598
>          URL: http://issues.apache.org/struts/browse/WW-598
>      Project: Struts Action 2
>         Type: New Feature

>   Components: Interceptors
>     Reporter: Matt Raible
>     Assignee: Matthew Porter
>     Priority: Minor
>      Fix For: WW 2.2.1

>
> Struts and Spring MVC both have the ability to map a particular exception to a particular page.  Struts goes a bit further and allows you to map an exception to an ExceptionHandler - allowing the user to wrap Exceptions in ActionErrors and return the user to where they came from (i.e. the INPUT).  
> I'd be nice to have a similar feature in WebWork.  Struts allows you to specify this at a global level or at an action level.  Spring is simply a global level.
> Spring Example:
>     <bean id="exceptionResolver" 
>         class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
>         <property name="exceptionMappings">
>             <props>
>                 <prop key="org.springframework.dao.DataAccessException">        
>                     dataAccessFailure
>                 </prop>
>             </props>
>         </property>
>     </bean>
> Struts Example:
>     <exception
>         key="exception.database.error"
>         type="net.reumann.DatabaseException"
>         path="/dataAccessFailure.jsp"/>
> I have a sample app I can quickly and easily test this functionality with.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira