How to upgrade Struts to 2.3.15.1

The Struts 2 DefaultActionMapper used to support a method for short-circuit navigation state changes by prefixing parameters with “redirect:” or “redirectAction:”, followed by a desired redirect target expression. This mechanism was intended to help with attaching navigational information to buttons within forms.In Struts 2 before 2.3.15.1 the information following “redirect:” or “redirectAction:” can easily be manipulated to redirect to an arbitrary location.

In the Struts Showcase App, open following URLs.1.http://host/struts2-showcase/fileupload/upload.action?redirect:http://www.yahoo.com/

2.http://host/struts2-showcase/modelDriven/modelDriven.action?redirectAction:http://www.google.com/%23

DefaultActionMapper was changed to drop the features involved with “redirect:”/”redirectAction:”-prefixed parameters completely.Backward Compatibility
After upgrading to Struts >= 2.3.15.1, applications using the “redirect:” / “redirectAction:” functionality will no longer work properly. Please investigate your code to replace such expressions with proper fixed navigation rules.

It is strongly recommended to upgrade to Struts 2.3.15.1, which contains the corrected Struts2-Core library.

Replace some library .jar like struts2-core-2.2.3.jar to struts2-core-2.3.15.1.jar
It depends on your applications but simply these files will be essential in many case.

  • commons-lang3-3.1.jar (just to be added)
  • ognl-3.0.6.jar (should be replaced)
  • struts2-core-2.3.15.1.jar (should be replaced)
  • struts2-dojo-plugin-2.3.15.1.jar (should be replaced)
  • struts2-jfreechart-plugin-2.3.15.1.jar (should be replaced)
  • xwork-core-2.3.15.1.jar (should be replaced)

All files of 2.3.15.1, here

Share →
Contact Form Powered By : XYZScripts.com