• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts 2 upgrade tips

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am quit new to struts, currently I am handling struts 2 upgrade for one of my project, the version difference is big, from 2.1.6 to 2.3.15.1, reason for upgrade is the struts new security issues.

http://struts.apache.org/release/2.3.x/docs/s2-016.html
http://struts.apache.org/release/2.3.x/docs/s2-017.html

Since the gap is big thus when I upgrade struts and it's dependent libraries there are certain method not found and class not found exception during deployment time/ run time. I had done certain patching to the latest jar files

Later I realize if the framework does not have backward compatibility and I am actually jumping from very old version right away to the latest, there will be a lot of method not found cases...

Thus I have a doubt about the struts 2 framework, one very simple but tricky question here:

Does struts 2 framework provide backward compatibility?

If anyone had done similar things as I do, please just help this little kid here

Thanks for help guys.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not aware of any compatiblity issues between those two versions. If you removed the previous version and all its dependencies and replaced it with the new version it should just work. Now if your code had dependencies on those libraries other than the struts api, you may have issues if those other api's have changed. What errors are you seeing?
 
Lu Wenhao
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Joe,

By right it should work, however upon upgrading when I change the dispatch filter it is shown method not found for:

stripExpressionIfAltSyntax(ValueStack stack, String expr)

This method is one of the struts api in older version but not included in the same place in newer version. I actually de-compile the class file and found that the method is really no longer supported. The same method can be found in another utility class.

But application is still trying to make use of that method to retrieve form values with patter {%param=value%}.

If with the new struts framework, I am actually expecting the application not using the method anymore since I had upgraded all struts related libraries. However it is still trying to call the method. What make things worse is after I tried to patch the method back, it works.....

There are other issues with x-work libraries as well, one utility implementation "TextUtils" is being removed, this one seems to be fine because it appears that only my applications are making use of it. At least, we may be able to find equivalent implementations or just change implementations to be self-serving.

I am quite concerned now because I managed to make one application working now, after all the upgrade, configuration change and even patch the upgraded libraries (for trial usage only). But when I try to change the same thing for another application, I don't know whether new problems will just pop up... Trying and testing systems one by one is the last thing I want to do because they are just tooooooo big.

 
reply
    Bookmark Topic Watch Topic
  • New Topic