Results 1 to 9 of 9

Thread: SpringWebFlowExceptionResolver support for SWF 1.0.x

  1. #1
    Join Date
    Jan 2006
    Location
    Zürich, Switzerland
    Posts
    423

    Default SpringWebFlowExceptionResolver support for SWF 1.0.x

    Hi everybody,

    I have finally posted an update to my SpringWebFlowExceptionResolver code with support for SWF 1.0.x. For details and to download the code, check out the JIRA issue:

    http://opensource.atlassian.com/proj...browse/SWF-158

    I invite people to give it a try and provide feedback on any issues you might have with it!

    And who knows... if it meets enough people's needs, maybe it will be included in a feature release of SWF.

    cheers,

    Sam

  2. #2
    Join Date
    Apr 2007
    Posts
    14

    Default

    hey sam,
    is there an easy way to simply redirect to some non-flow error page instead of launching the defaultFlowId when an exception is caught? i'm using the latest version of SpringWebFlowExceptionResolver (1.8).

  3. #3
    Join Date
    Jan 2006
    Location
    Zürich, Switzerland
    Posts
    423

    Default Use SimpleMappingExceptionResolver instead of SpringWebFlowExceptionResolver

    Hi fadetoblack,

    Sorry I didn't get back to you sooner, but I was away on vacation.

    Quote Originally Posted by fadetoblack View Post
    is there an easy way to simply redirect to some non-flow error page instead of launching the defaultFlowId when an exception is caught? i'm using the latest version of SpringWebFlowExceptionResolver (1.8).
    Yes, indeed. There is a much simpler way. In fact, you don't even need to bother with SpringWebFlowExceptionResolver if you just want to display an error page. This functionality comes out-of-the-box with the Spring MVC framework.

    Take a look at SimpleMappingExceptionResolver, which SpringWebFlowExceptionResolver extends.

    Here's a short mention of it in the reference manual: http://static.springframework.org/sp...eptionhandlers

    Here's the JavaDoc: http://www.springframework.org/docs/...nResolver.html

    And here's an example to get you started:

    Code:
    <bean id="simpleMappingExceptionResolver" class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
    	<property name="defaultErrorView" value="error/generalError" />
    	<property name="exceptionMappings">
    		<props>
    			<prop key="org.springframework.webflow.conversation.NoSuchConversationException">error/abortedWebFlowException</prop>
    		</props>
    	</property>
    </bean>
    Hope this helps,

    Sam

  4. #4
    Join Date
    Apr 2007
    Posts
    14

    Default

    excellent, thanks for the help!

  5. #5
    Join Date
    Nov 2006
    Location
    Germany
    Posts
    452

    Default

    Hi Sam,

    is there any plan to make the code compatible with java 1.4 in the future ?
    Because people like me have to fight with websphere and jdk 1.4.2 @ the customers.

    best regards
    lyserg

  6. #6
    Join Date
    Jan 2006
    Location
    Zürich, Switzerland
    Posts
    423

    Default

    Hi Lyserg,

    Quote Originally Posted by Lyserg View Post
    is there any plan to make the code compatible with java 1.4 in the future ?
    Because people like me have to fight with websphere and jdk 1.4.2 @ the customers.
    I originally created the code for myself, and I've been using JDK 1.5. So I naturally used the new language features (for hopefully obvious reasons ).

    You are the first person to voice an interest in removing the JDK 1.5 dependency; however, I imagine there are others. Besides, if it does get merged into the SWF core, it would need to be backwards compatible.

    Long story short: I'll be away on business the rest of this week, but I'll try to update the code for JDKs < 1.5 some time next week.

    cheers,

    Sam

  7. #7
    Join Date
    Jan 2006
    Location
    Zürich, Switzerland
    Posts
    423

    Default SpringWebFlowExceptionResolver no longer dependent on JDK 1.5

    Hi lyserg,

    Quote Originally Posted by Lyserg View Post
    Hi Sam,

    is there any plan to make the code compatible with java 1.4 in the future ?
    Because people like me have to fight with websphere and jdk 1.4.2 @ the customers.

    best regards
    lyserg
    Check out version 1.10, which I uploaded today to JIRA:

    http://opensource.atlassian.com/proj...browse/SWF-158

    I think (hope) that will solve your JDK 1.4 compatibility issues. Please give it a try and let me know how it works out!

    cheers,

    Sam

  8. #8
    Join Date
    Nov 2006
    Location
    Germany
    Posts
    452

    Default

    Hi Sam,

    great, i will give it a try on next week.

    thanks a lot in advance

    regards
    lyserg

  9. #9
    Join Date
    Jan 2007
    Posts
    1

    Default

    Hi,

    I was able to use this exception resolver class and it is really great.
    However, since it does redirect - url resolver is unable to propagate exception into the model for resolved error view. At least i could not access ${exception} after this resolver was executed.
    Does someone know how exception can be propagated? It can be useful to display errors to users sometimes, instead of just restarting the flow.

    Thanks,
    Radovan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •