Spring 3 MVC and Apache Tiles 3 integration Error

Source: Internet
Author: User

<BeanID= "Viewresolver"class= "Org.springframework.web.servlet.view.tiles3.TilesViewResolver">        < Propertyname= "Viewclass">            <value>Org.springframework.web.servlet.view.tiles3.TilesView</value>        </ Property>    </Bean>    <BeanID= "Tilesconfigurer"class= "Org.springframework.web.servlet.view.tiles3.TilesConfigurer">        < Propertyname= "Definitions">            <List>                <value>/web-inf/conf/tiles.xml</value>            </List>        </ Property>    </Bean>

Note that if the newspaper Java.lang.noclassdeffounderror:org/apache/tiles/startup/basictilesinitializer

Your configuration is wrong, Tiles2 corresponds to Tiles2 's view and configure, and Tiles3 corresponds to 3 view and configure, so the corresponding node should be changed to the corresponding version of the value

Also in the Tiles.xml file configuration, the DTD type should also be the corresponding change, as follows:

<?XML version= "1.0" encoding= "UTF-8"?>  <!DOCTYPE tiles-definitions Public "-//apache software foundation//dtd tiles Configuration 2.0//en" "Htt P://tiles.apache.org/dtds/tiles-config_3_0.dtd "><tiles-definitions>    <definitionname= "Base.definition"Template= "/web-inf/views/share/layout.jsp">        <Put-attributename= "title"value="" />        <Put-attributename= "header"value= "/web-inf/views/share/header.jsp" />        <Put-attributename= "Body"value="" />        <Put-attributename= "Footer"value= "/web-inf/views/share/footer.jsp" />    </definition>    <definitionname= "Test/helloworld"extends= "Base.definition">        <Put-attributename= "title"value= "HelloWorld" />        <Put-attributename= "Body"value= "/web-inf/views/test/helloworld.jsp" />    </definition></tiles-definitions>  

Spring 3 MVC and Apache Tiles 3 integration Error

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.