0

My company plan to migrate Struts from 1.2.9 to 2.5.22 but found that might be the hard work and consume a lot of time.

I want to know for planning and manage the project, how much time it need to do.

Is possible to upgrade from 1.2.9 directly to 2.5.22 (the latest version at the time of question)

Or it need to upgrade like 1.2.9 -> 2.0.x -> 2.3.x -> 2.5.22 ?

And if you have a clear guide it would be appreciate.

Natta Wang
  • 553
  • 11
  • 18
  • You should read [this](https://stackoverflow.com/a/31903415/573032) answer before you make any decisions. – Roman C Jul 31 '20 at 05:58
  • You can go directly to 2.5 since there's essentially nothing the same about the frameworks. This is tagged with Spring but cannot comment on that since no information is provided. – Dave Newton Jul 31 '20 at 17:49

1 Answers1

0

Struts1 and Struts2 are completely different and therefore the code won't work just upgrading the Struts2 version: there are differences at all level from configuration, threading model, JSP tags and Actions classes.
You can read here

Our strategy when we migrated a significantly large (legacy) application followed those guidelines:

  • include Struts2 jar files and configuration files: they can happily co-exist with Struts1
  • create new screens with Struts2: define a new namespace so URLs are different and there is no collision (it also helps for debugging)
  • rewrite incrementally the application: move one screen at the time creating a new Struts2 action handler and new JSPs

We have used Spring for the new Struts2 implementation (again they all co-exist in the same WAR) since the integration is smooth.

We have been also able to re-use part of the service layer (business logic and DAO): the service code was refactored to be Spring-managed and injected in the Struts2 Action classes.

Beppe C
  • 11,256
  • 2
  • 19
  • 41