Hi,
Any tutorial/help of integrating webflow with Struts will be helpful.
Thanks in advance
Hi,
Any tutorial/help of integrating webflow with Struts will be helpful.
Thanks in advance
We don't have a tutorial yet, but the preview 2 release of Spring Web Flow includes a sample application that demonstrates Struts integration: the BirthDate sample.
Erwin
Thanks
Please could you tell me what changes are required to the Phonebook and SellItem samples to make them work with Struts.
I have looked through the Birthdate Example. But when I refresh or Go back I get the session expired problem.
But this does not happen in the SellItem and Phonebook examples.
Please could you guide me.
Thanks in advance.
For Struts integration, just follow what the BirthDate sample does.
The SellItem sample app uses continuations to be able to handle refresh and browser back button use. Here's how it configures the flow execution manager to make use of a continuations based flow execution storage strategy:
ErwinCode:<bean id="frontController" name="/pos.htm" class="org.springframework.web.flow.mvc.FlowController"> <property name="flowExecutionManager" ref="flowExecutionManager"/> </bean> <bean id="flowExecutionManager" class="org.springframework.web.flow.execution.servlet.HttpServletFlowExecutionManager"> <property name="flowExecutionStorage"> <bean class="org.springframework.web.flow.execution.servlet.HttpSessionContinuationFlowExecutionStorage"/> </property> <!-- <property name="flowExecutionStorage"> <bean class="org.springframework.web.flow.execution.servlet.HttpSessionFlowExecutionStorage"/> </property> --> <!-- <property name="flowExecutionStorage"> <bean class="org.springframework.web.flow.execution.ClientContinuationFlowExecutionStorage"> <property name="compress"><value>true</value></property> </bean> </property> --> </bean>
Thanks,
For org.springframework.web.flow.mvc.FlowController we can set the flowExecutionManager property how do we do it for a Struts FlowAction ??
Good point
Sinds you don't have dependency injection in Struts for actions, you'll have to subclass the FlowAction and override the createFlowExecutionManager method. Something like this:
ErwinCode:protected HttpServletFlowExecutionManager createFlowExecutionManager(ActionMapping mapping) { HttpServletFlowExecutionManager manager = super.createFlowExecutionManager(mapping); manager.setFlowExecutionStorage(new HttpSessionContinuationFlowExecutionStorage()); return manager; }
Thanks for everything.
It would be very kind of you if you could give me a more detailed explaination. ( code from any other application on smilar lines could be extreamly helpful)