Add this label to Struts-2.2.3.1, and an error is returned.

Source: Internet
Author: User
When/mystruts/webroot/WEB-INF/lib/struts2-dojo-plugin-2.1.8.jar package has been introduced, if I use <s: Head theme = "ajax"/>, the following exception is thrown: class: freemarker. core. templateobject file: templateobject. java method: assertnonnull if I didn't introduce the struts2-dojo-plugin-2.1.8.jar package, the following exception will be thrown: expression parameters. parsecontent is undefined on line 45, column 28 in template/ajax/head. FTL. -Class: freemarker. core. templateobjectfile: templateobject. java error. The cause of this problem is found on the Net: the Ajax topic provided by struts is used on the JSP page, but the problem occurs when the topic is declared, an important change from struts2.0 to struts2.1 is the change in Ajax support. The Ajax support of struts2.0 is mainly based on DWR and dojo and provides Ajax topics, such as: <s: head theme = "ajax"/>, but in struts2.1, the Ajax topic is not provided, but the original Ajax topic is put into the dojo plug-in. We need to introduce the dojo tag to the JSP page, change <% @ taglib uri = "/Struts-tags" prefix = "S" %> <% @ taglib uri = "/Struts-Dojo-tags" prefix = "SX" %> <SX: head theme = "ajax"/> throws the following exception: Then, an exception occurs: attribute theme invalid for tag head according to TLD solution: <SX: change head theme = "ajax"/> to the following two lines. Do not change the other lines: <s: Head theme = "XHTML"/> <SX: head parsecontent = "true"/>

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.