File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Changes when transforming application from Struts to Spring framework. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Changes when transforming application from Struts to Spring framework." Watch "Changes when transforming application from Struts to Spring framework." New topic
Author

Changes when transforming application from Struts to Spring framework.

vishalp pradhanp
Greenhorn

Joined: Aug 01, 2011
Posts: 10

Hi,
I am new to spring and I want to transfer a Struts application into Spring framework.
So what precaution should I take to transfer it into Spring Framework.
Which are the major changes,I should look at?
If anyone had this type of experience,please share it with me.

Thank you in advance.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Depends, are your removing all Struts, no more Action classes, or just having Struts and Spring together?

If keeping Action classes, just have them extend ActionSupport and inject your Spring beans into it, no longer needing any ServiceLocator pattern.

If moving to Spring MVC, then all your Actions will have to be rewritten with Controller classes.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
vishalp pradhanp
Greenhorn

Joined: Aug 01, 2011
Posts: 10

Hi Mark,
I am going to remove all actions classes from struts and I have to create a template of Spring for jsp,controller and beans,
so that others also can refer to that template and generate application.
So I am wondering which controller should I use?that will handle all types of actions,
as in my jsp most of the times multiple actions are present.

Thank you.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

vishalp pradhanp wrote:Hi Mark,
I am going to remove all actions classes from struts and I have to create a template of Spring for jsp,controller and beans,
so that others also can refer to that template and generate application.
So I am wondering which controller should I use?that will handle all types of actions,
as in my jsp most of the times multiple actions are present.

Thank you.


I don't know your code to even give you an answer. Except, one that isn't too hard, but at the same time not trivial.

Also, make sure you are using the latest version of Spring 3.0.5 and that you use Spring MVC Annotations. Use the latest, don't do things the old way in Spring MVC.

Mark
vishalp pradhanp
Greenhorn

Joined: Aug 01, 2011
Posts: 10

Thank you mark,
I will keep your suggestion in mind.
 
wood burning stoves
 
subject: Changes when transforming application from Struts to Spring framework.