How to migrate Struts from 2.0 to 2.5?

瘦欲@ 提交于 2019-12-12 09:55:11

问题


I am working in a Struts 2.0 Project.

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


回答1:


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.



来源:https://stackoverflow.com/questions/42995276/how-to-migrate-struts-from-2-0-to-2-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!