I have a struts project using JSP for the view part. We integrated the Spring into it & it now works fine.
The next step we are planning is to use the Spring Web Flow (SWF). I have a couple of doubts in this.
1. Is JSF mandatory to make use of the SWF?
2. If it is mandatory, is it easy to migrate from JSP to JSF? (I have little idea about JSF and number of web pages is not much may be 13-15.)
3. If it is not mandatory, could someone tell me how to use SWF with Struts+Spring+JSP proj?
If anyone has any idea about this issues, please help me. And suggest me any documents/resources about these topic - integrating JSF into Struts+Spring proj and using webflow with the same.
Yeah i did googled abt this and I got fair idea of the basics of SWF. But the point which I wanted to ask was : how do I redirect the flow to the SWF when I first request my logon page of my application. I don't know if you got my point - more spcecifically I want to know how to tell my application to use the SWF.
I've configured web flow using folowing code
But at some point I should make the request to lookup the **-flow.xml to find the next step in the flow. How do I do that?
No JSF is not needed for SWF - SWF is it's own standalone technology - separate from any specific view layer. You'll want to treat SWF - or more specifically each Flow defined in SWF - as kind of it's own controller. You map the views and the models within your flow configuration.
You can define a Flow that handles login and maps to actions after it - but that's probably overkill - you'll probably just want to define flows as a replacement for WizardControllers - defined workflows that take multiple screens. Login isn't really a good candidate for this - the flow is simple, just one screen, and you'll probably want to use it in multiple places - for the normal initial login, for redirecting people there when they logout, and redirecting if their session times out.
It's easier to push the login info into the webflow - in SWF 2.0 it looks like they have the idea of secured flows - so if you use Acegi / Spring security for login, you can use this information in flows. In SWF 1.0 I used FlowExecutionListeners to listen for the start of a flow and inject login information into the flow from the session.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.