Description of problem: In order to use Spring WebFlow 2.3 with RichFaces 4 you have to define an extra bean to resolve RichFaces resources. This bean is not automatically a part of faces:resources. Version-Release number of selected component (if applicable): Richfaces 4.1.0.CR1-redhat-1 How reproducible: Always. Steps to Reproduce: 1. Include RichFaces 4.1 2. Include Spring WebFlow 2.3 3. Configure Spring WF with following: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:faces="http://www.springframework.org/schema/faces" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces-2.2.xsd"> <faces:resources /> <!-- Maps request paths to flows in the flowRegistry; e.g. a path of /hotels/booking looks for a flow with id "hotels/booking" --> <bean id="flowMapping" class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping"> <property name="order" value="1" /> <property name="flowRegistry" ref="flowRegistry" /> <property name="defaultHandler"> <!-- If no flow match, map path to a view to render; e.g. the "/intro" path would map to the view named "intro" --> <bean class="org.springframework.web.servlet.mvc.UrlFilenameViewController" /> </property> </bean> <!-- Maps logical view names to Facelet templates in /WEB-INF (e.g. 'search' to '/WEB-INF/search.xhtml' --> <bean id="faceletsViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"> <property name="viewClass" value="org.springframework.faces.mvc.JsfView" /> <property name="prefix" value="/WEB-INF/" /> <property name="suffix" value=".xhtml" /> </bean> <!-- Dispatches requests mapped to org.springframework.web.servlet.mvc.Controller implementations --> <bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" /> <!-- Dispatches requests mapped to flows to FlowHandler implementations --> <bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter"> <property name="flowExecutor" ref="flowExecutor" /> </bean> </beans> Actual results: 404 errors when when a CSS file is requested. Expected results: CSS and JS files are found. Workaround: Add following into configuration: <!-- RichFaces resource handling https://issues.jboss.org/browse/RFPL-1430 --> <bean name="richfacesResourceHandler" class="org.springframework.faces.webflow.JsfResourceRequestHandler" /> <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="order" value="1" /> <property name="mappings"> <value> /rfRes/**=richfacesResourceHandler </value> </property> </bean> and change the order of flowMapping to 2.
Technical note will be required if this is not fixed in spring-faces.
External reference https://jira.springsource.org/browse/SWF-1473
Where does that configuration change have to be added?
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Using Spring WebFlow 2.3 and RichFaces 4 together requires an extra bean to resolve RichFace resources, but this bean is not automatically part of faces:resources and gives a 404 error when a CSS file is requested. The workaround for this issue is to change the order of flowMapping to 2, and add the following configuration: <bean name="richfacesResourceHandler" class="org.springframework.faces.webflow.JsfResourceRequestHandler" /> <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="order" value="1" /> <property name="mappings"> <value> /rfRes/**=richfacesResourceHandler </value> </property> </bean>
This is in upstream issue, moving to ASSIGNED and unscheduling.
Pete Muir <pmuir.uk> made a comment on jira WFK2-145 [~jowilson] [~bleathem] can you check if this is still an issue for us?
Joshua Wilson <jowilson> made a comment on jira WFK2-145 [~bleathem] Here is a Spring WebFlow example that uses JSF. Would you be able to modify it to use Richfaces to test this? https://github.com/SpringSource/spring-webflow-samples/tree/master/booking-faces
Brian Leathem <bleathem> made a comment on jira WFK2-145 I just did a quick scan through the snowdrop examples, and it appears we have a working RichFaces/Webflow demo: https://github.com/snowdrop/snowdrop-examples/blob/master/sportsclub/spring-3_2/sportsclub-reservations-webflow/pom.xml [~jowilson] can you run the above example with current versions (RichFaces 4.3.3.Final) and see if the problem persists?
Joshua Wilson <jowilson> made a comment on jira WFK2-145 I ran Sportsclub with RichFaces 4.3.3 and I didn't see anything wrong. Looks like it works.
Brian Leathem <bleathem> made a comment on jira WFK2-145 Indeed, it looks like this has been resolved in Spring Webflow 2.4.0: https://jira.springsource.org/browse/SWF-1473
Joshua Wilson <jowilson> made a comment on jira WFK2-145 [~bleathem] - Good find.
Marek Novotny <mnovotny> made a comment on jira WFK2-145 Cool, that we know what could be fixed. [~jowilson] Could you set devel_ack to + ? We need to upgrade Spring WebFlow in WFK Spring BOMs, where it uses 2.3.1.RELEASE and 2.3.2.RELEASE.
Marek Schmidt <maschmid> made a comment on jira WFK2-145 Spring webflow 2.4 has not yet been released.