Vincent Ramdhanie
Vincent Ramdhanie

Reputation: 103135

Migrating from Struts2 to Spring MVC

Scenario: A fairly mature project uses Struts2 and Spring and Hibernate. I say mature because it has been going on a for a while and there are many struts actions written already.

Suppose we wanted to remove Struts2 from the project and instead depend entirely on Spring MVC without rewriting the entire project.

Is this something that should even be considered? Are there any migration guides out there? Has anyone done this before and would like to warn me against it?

Upvotes: 3

Views: 5343

Answers (4)

user2069647
user2069647

Reputation: 52

With Struts2 security vulnerabilities being exposed and reported often, this task takes on more importance.

Upvotes: 1

Pascal Thivent
Pascal Thivent

Reputation: 570305

If it ain't broke, don't fix it. You have very likely better things to do than a migration that won't add any value to the product (and will certainly introduce some bugs). If I were the business, I would never buy such a migration (with close to zero benefits).

Upvotes: 9

Kartik
Kartik

Reputation: 2609

You can do it slowly. Struts is a MVC framework. The rest of your application (business and data tiers) are classes which can be invoked by action classes. Struts is a plugin based architecture and it is easy for you to define a plugin in struts configuration file.

Take a look at this link. This may help.

Upvotes: 1

Ryan P.
Ryan P.

Reputation: 845

I have to ask: What advantages do you see with Spring MVC that aren't being fulfilled by Struts 2?
If there's not at least a handful of "smoking hot" features, or the amount of time saved is more than enough to overcome the time taken for the migration in the first place then it's probably best to stick with what you have.

Upvotes: 1

Related Questions