Turn from:
Http://www.cnblogs.com/shanheyongmu/p/5684595.html
<!--Velocity -<BeanID= "Velocityviewresolver"class= "Org.springframework.web.servlet.view.velocity.VelocityViewResolver"> < Propertyname= "Order"value= "0" /> < Propertyname= "ContentType"value= "Text/html;charset=utf-8" /> < Propertyname= "Requestcontextattribute"value= "req"/></Bean> <BeanID= "Velocityconfig"class= "Org.springframework.web.servlet.view.velocity.VelocityConfigurer"> < Propertyname= "Configlocation"value= "/web-inf/velocity.properties"/> < Propertyname= "Resourceloaderpath"value="/" /></Bean><!--Freemarker -<BeanID= "Freemarkerviewresolver"class= "Org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver"> < Propertyname= "Order"value= "0" /> < Propertyname= "Viewclass"value= "Org.springframework.web.servlet.view.freemarker.FreeMarkerView"/> </Bean> <BeanID= "Freemarkerconfig"class= "Org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer"> < Propertyname= "Configlocation"value= "/web-inf/freemarker.properties"/> < Propertyname= "Templateloaderpath"value= "/web-inf/ftl/"/> < Propertyname= "Freemarkervariables"> <Map> <entryKey= "Xml_escape"Value-ref= "Fmxmlescape"/> </Map> </ Property></Bean><BeanID= "Fmxmlescape"class= "Freemarker.template.utility.XmlEscape"/> <!--Tiles - <BeanID= "Tilesviewresolver"class= "Org.springframework.web.servlet.view.UrlBasedViewResolver"> < Propertyname= "Viewclass"value= "Org.springframework.web.servlet.view.tiles3.TilesView"></ Property> < Propertyname= "Order"value= "1" /></Bean> <BeanID= "Tilesconfigurer"class= "Org.springframework.web.servlet.view.tiles3.TilesConfigurer"> < Propertyname= "Definitions"> <List> <value>Classpath:layout.xml</value> </List> </ Property></Bean><!--define the location of the JSP file - <BeanID= "Viewresolver"class= "Org.springframework.web.servlet.view.InternalResourceViewResolver"> < Propertyname= "prefix"value= "/web-inf/pages/"/> < Propertyname= "suffix"value= ". jsp"/> < Propertyname= "Order"value= "1" /></Bean>
Attention:
Key points <property name= "order" value= "1"/> configuration 0,1,2,3,4,5,6 ... first parse from 0, then down, JSP must be put to the end, otherwise find the return page directly back to the 404 page, Do not go to other pages to match, or JSP order to the highest, this is a pit, or write the parser to parse.
SPRINGMVC Configuring multiple views-tiles, velocity, freemarker, JSP