To use struts2.1.6 normally, at least six jar packages are required:
Struts2-core-2.1.6.jar
Freemarker-2.3.13.jar
Commons-logging-1.0.4.jar
Ognl-2.6.11.jar
Xwork-2.1.2.jar
Commons-fileupload-1.2.1.jar
Note that the minimum jar package configuration of struts 2.1.6 has a commons-fileupload-1.2.1.jar more than struts2.0.14.
To use the Annotation Feature of struts2, you only need to reference the struts2-core-2.1.6.jar file in struts2.0.14, and you also need to reference the struts2-convention-plugin-2.1.6.jar file in struts2.1.6, the annotation class package has also changed (some new annotation classes have been added). The annotation class in struts2.0.14 is in org. apache. in the struts2.config package, and the comment class of struts2.1.6 is in org. apache. struts2.convention. annotation package. In addition, the attribute names of some annotations have also changed. For example, the result annotation has a value attribute in struts2.0.14, indicating a URL to be transferred.
In the result annotation of struts2.1.6, the location attribute is used to replace the value attribute (the value attribute is no longer available), but they are used in the same way.
Therefore, when using struts2.1.x, you should note that this version is not fully compatible with struts2.0.x (but most of it is still compatible ). In my experience, struts2.1.x is a relatively stable version of struts2. Therefore, struts1.x is only popular in struts1.1.
Other versions of struts 2 have been tested before. Some tests show that struts 2 is divided into three versions: struts 2.0.9 and earlier versions, struts2.0.10 to struts2.0.14, and Struts 2.1.x, these three versions are not compatible. If you are sure to use struts2 to develop programs, we recommend that you directly use struts2.1.6 and later versions. This is a relatively stable version of struts2.
Necessary struts2 packages