The easiest way to combine both Web streams and simple Spring MVC controllers is to simply register simple controllers in URLs outside of any of your stream paths.
For example, here are some excerpts from our configuration files downloaded from web.xml single instance of DispatchServlet :
<mvc:view-controller path="/selectLanguage" view-name="selectLanguage"/> <bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping" p:order="-1"> <property name="flowRegistry" ref="flowRegistry" /> <property name="interceptors"> <list> <bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" p:paramName="lang"/> </list> </property> </bean> <webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices" base-path="/WEB-INF"> <webflow:flow-location-pattern value="/**/*-flow.xml" /> </webflow:flow-registry>
Thus, WebFlow will register all URL paths that correspond to the WEB-INF / ** / something-flow.xml file, and all other URL paths, such as /selectLanguage above , can be processed by a regular controller.
source share