Web Flow 2 maps selected view identifiers to files located within
the flow's working directory unless otherwise specified. For existing
Spring MVC + Web Flow applications, an external
is likely already handling this mapping for you. Therefore, to continue
using that resolver and to avoid having to change how your existing flow
views are packaged, configure Web Flow as follows:
<webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices"> <webflow:location path="/WEB-INF/hotels/booking/booking.xml" /> </webflow:flow-registry> <webflow:flow-builder-services id="flowBuilderServices" view-factory-creator="mvcViewFactoryCreator"/> <bean id="mvcViewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator"> <property name="viewResolvers" ref="myExistingViewResolverToUseForFlows"/> </bean>
The MvcViewFactoryCreator is the factory that allows you to
configure how the Spring MVC view system is used inside Spring Web Flow.
Use it to configure existing ViewResolvers, as well as other services such
as a custom MessageCodesResolver. You may also enable data binding use
Spring MVC's native BeanWrapper by setting the
useSpringBinding flag to true. This is an alternative to
using OGNL or the Unified EL for view-to-model data binding. See the
JavaDoc API of this class for more information.