Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.2.1
-
None
Description
I tried to put the flows and views inside META-INF in the classes folder (I am trying to experiment with SWF modularity by bundling the flows and views inside JAR). Unfortunately, the Spring Web Flow (2.2.1) will fail to load a flow identified by ID if base-path contains "classpath*:". Below is the configuration:
<webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices" base-path="classpath*:/META-INF/"> <webflow:flow-location id="parent-flow" path="parent-flow.xml"/> <webflow:flow-location-pattern value="/**/flow.xml" /> </webflow:flow-registry>
The error message:
org.springframework.webflow.engine.model.builder.FlowModelBuilderException: Could not access the XML flow definition at ServletContext resource [/classpath*:/META-INF/parent-flow.xml]
From the example above, if i remove the parent-flow, it will throw the following error if I try to access one of the flows:
java.lang.IllegalStateException: A ContextResource is required to get relative view paths within this context; the resource was file [/Users/wolf/Development/Workspace/webproject/target/classes/META-INF/user/user.xhtml]
I have also configured RESOURCE_RESOLVER in web.xml using Jsf2FlowResourceResolver, but it didn't work. I also include the project files to simulate this issue. Thanks a lot.
Regards,
Donny