How to redirect to an external link with Spring Webflow?

Below you can find an easy way to redirect to an external site via a Spring Webflow view state. What happens here is the following:

  1. a JSF command link backing bean action method returns the String link1
  2. Spring Webflow will redirect you to the viewstate OpenLink1
  3. The OpenLink1 view-state uses the externalRedirect functionality with a backingbean/dataholder stored link value

<view-state id=”myViewState” view=”/viewstates/mypage.jspx”>
<transition to=”OpenLink1″ on=”link1″/>

<view-state id=”OpenLink1″ view=”externalRedirect:${conversationScope.dataHolder.link1}”/>

Warning: count(): Parameter must be an array or an object that implements Countable in /home/javablog/web/wp-includes/class-wp-comment-query.php on line 405

3 thoughts on “How to redirect to an external link with Spring Webflow?”

Leave a Reply

Your email address will not be published. Required fields are marked *