<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