I have been using web flow for years now and have several flows that use jsp pages as their view technology. I recently upgraded to web flow 2.2.1 and was looking to take advantage of the JSF technology. I have configured my app following the sample code that has been provided. However with the configuration below I can only get xhtml to work as my view technology. This is an issue because I have several jsp flows that work well and it doesn't make sense to rewrite.
My main question is can JSF and JSP coexist in web flow 2.2.1 and if so how would I configure my web.xml and webflow-config.xml?
Following works with JSF but now my jsp flows won't load:
webflow-config.xml
web.xmlCode:<webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices"> <webflow:flow-location-pattern value="/WEB-INF/flows/*-flow.xml" /> </webflow:flow-registry> <!-- Installs a listener that creates and releases the FacesContext for each request. --> <bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener"/> <!-- Configures the Spring Web Flow JSF integration --> <faces:flow-builder-services id="facesFlowBuilderServices" development="true" />
My pervious webflow-config looked like this (with jsp based flows):Code:<!-- Just here so the JSF implementation can initialize, *not* used at runtime --> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <!-- Just here so the JSF implementation can initialize --> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.faces</url-pattern> </servlet-mapping>
Code:<webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices"> <webflow:flow-location-pattern value="/WEB-INF/flows/*-flow.xml" /> </webflow:flow-registry> <webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry"/> <webflow:flow-builder-services id="flowBuilderServices" view-factory-creator="mvcViewFactoryCreator"/> <bean id="mvcViewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator"> <property name="viewResolvers" ref="viewResolver"/> </bean> <bean id="viewResolver" class="org.springframework.web.servlet.view.ResourceBundleViewResolver"> <property name="basename"> <value>views</value> </property> </bean>
Thanks in advanced,
Keith


Reply With Quote