Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to migrate Struts from 2.0 to 2.5?

I am working on Struts 2.0 Project.

What are the steps and precautions needed to do while upgrading Struts from 2.0 to 2.5?

like image 977
Abhay Kumar Pandit Avatar asked Feb 05 '23 19:02

Abhay Kumar Pandit


1 Answers

Many things have changed since Struts 2.0 (that is 10 years old).

They're all described in the version notes of each release, that you should read.

The best shot you have, however, is to bring your 2.0 project to a 2.3 one (the latest version, that currently is 2.3.32).

The biggest things that you'll need to refactor (from 2.0 to 2.3.32) are:

  • remove DMI (this will probably be the biggest).
  • remove Dojo plugin and tags
  • remove static method accesses
  • change the filter
  • change the id attribute to var attribute in tags
  • change the dtds of xml files (struts.xml, validation files etc)

Once you have a full working 2.3 project, you can follow the official Struts 2.3 to 2.5 Migration Guide.

Remember that, while up to Struts 2.3 you were allowed to use Java >= 6,
Struts 2.5 will run on Java >= 7 only.

Good luck.

like image 73
Andrea Ligios Avatar answered Feb 07 '23 09:02

Andrea Ligios