Struts2 Ajax support-Dojo

Source: Internet
Author: User

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:

    1. 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
    2. 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 " %>
    3. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.