Integrating Spring Webflow 2 and Apache Tiles

Alex Marshall picture Alex Marshall · Dec 2, 2008 · Viewed 11.4k times · Source

I've recently started upgrading some applications to use Spring Webflow 2, and I want to make use of the new Ajax functionality that comes with Webflow 2. Can somebody please direct me to a tutorial for integrating Tiles 2 with Spring Webflow (since that's apparently what they recommend). I've found the documentation that comes with Webflow 2 in this regard to be absolutely useless.

Answer

TM. picture TM. · May 8, 2009

This isn't exactly referring to the ajax features, but it helped me get apache tiles 2 set up for regular flows:

http://jee-bpel-soa.blogspot.com/2008/12/spring-web-flows-2-and-tiles.html

A lot more details are at the link, but the core bit you need is a new view resolver:

<bean id="tilesViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
    <property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView" />
</bean>
<bean class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
    <property name="definitions" value="/WEB-INF/flows/main/main-tiles.xml" />
</bean>