File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Spring, JSF , SWF & Struts- doubt??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring, JSF , SWF & Struts- doubt???" Watch "Spring, JSF , SWF & Struts- doubt???" New topic
Author

Spring, JSF , SWF & Struts- doubt???

Srikanth Madasu
Ranch Hand

Joined: Sep 10, 2008
Posts: 48

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.

Thanks in advance!!

Srik.


If it's easy.. then everybody would do it!
Vikas Kapoor
Ranch Hand

Joined: Aug 16, 2007
Posts: 1374
1. Is JSF mandatory to make use of the SWF?

IMO, It's not mandatory.
3. If it is not mandatory, could someone tell me how to use SWF with Struts+Spring+JSP proj?

Integrating Spring and WebFlow. http://www.ervacon.com/products/swf/intro/index.html
Did you try googling first?
Srikanth Madasu
Ranch Hand

Joined: Sep 10, 2008
Posts: 48

Vishal, thanks for the reply.

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?

I am not sure If my question is clear...
Vikas Kapoor
Ranch Hand

Joined: Aug 16, 2007
Posts: 1374
Srik,

I don't have hands-on experience with Spring WebFlow. But the link that I have provided and http://www.springsource.org/webflow-samples should help you somehow.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

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.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring, JSF , SWF & Struts- doubt???