Reference: struts 2 Ajax support (1)
Struts 1 does not have any Ajax support at all, while webwork provides some support through some Ajax labels.
One of the important changes from struts 2.0 to struts 2.1 is the change in Ajax support.
The Ajax support of struts 2.0 mainly focuses on DWR and dojo and provides Ajax topics. However, due to the instability of the dojo version, Struts 2.1 no longer provides Ajax themes, but adds the original Ajax themes to the dojo plug-in of struts 2. If you want to use the original Ajax topic of struts 2.0, you must manually add the dojo plug-in of struts 2.
Step 3:
- copy the struts2-dojo-plugin-2.2.1.jar under the lib directory of struts 2.1 or later to the WEB-INF \ lib directory of the Web application
- use the following Code to import a dojo tag on the JSP page that requires the dojo tag
<%@ taglib prefix = " SX " URI = "/Struts-Dojo-tags " %>
- Add the head tag of dojo to the JSP page that requires the use of the dojo tag.
<Head>
<Title>Asynchronous form</Title>
<SX: Head/>
</Head>
Note:<SX: Head/>Label is usedDojoPlug-in labels provide auxiliary services, which can be imported on the pageDojoRequiredCSSLibrary andJavascriptLibrary, so you only need to useDojoThe labels provided by the plug-in should be used on this page<SX: Head/>Tag