Make Tiles 3 the default implementation in spring-webmvc
Move spring-webmvc-tiles3 content to spring-webmvc, and create a spring-webmvc-tiles2 module with Tiles 2 support. Its allows View Resolution to configure Tiles 3 instead of Tiles 2. Issue: SPR-7093
This commit is contained in:
committed by
Rossen Stoyanchev
parent
92402e7715
commit
a26b1ef8d9
@@ -5,13 +5,12 @@
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<mvc:view-resolvers>
|
||||
<mvc:jsp prefix="/WEB-INF/" suffix=".jsp" />
|
||||
<mvc:view-resolvers>
|
||||
<mvc:jsp prefix="/WEB-INF/" suffix=".jsp" />
|
||||
<mvc:bean-name />
|
||||
<mvc:tiles definitions="/tiles.xml" />
|
||||
|
||||
<mvc:freemarker prefix="" suffix=".ftl" templateLoaderPath="/WEB-INF/ftl/" />
|
||||
</mvc:view-resolvers>
|
||||
<mvc:tiles definitions="/org/springframework/web/servlet/resource/tiles/tiles1.xml,/org/springframework/web/servlet/resource/tiles/tiles2.xml" />
|
||||
<mvc:freemarker prefix="" suffix=".ftl" templateLoaderPath="/" />
|
||||
</mvc:view-resolvers>
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE tiles-definitions PUBLIC
|
||||
"-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
|
||||
"http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
|
||||
<tiles-definitions>
|
||||
<definition name="base.definition"
|
||||
template="/WEB-INF/jsp/layout.jsp">
|
||||
<put-attribute name="title" value="" />
|
||||
<put-attribute name="header" value="/WEB-INF/jsp/header.jsp" />
|
||||
<put-attribute name="menu" value="/WEB-INF/jsp/menu.jsp" />
|
||||
<put-attribute name="body" value="" />
|
||||
<put-attribute name="footer" value="/WEB-INF/jsp/footer.jsp" />
|
||||
</definition>
|
||||
|
||||
<definition name="contact" extends="base.definition">
|
||||
<put-attribute name="title" value="Contact Manager" />
|
||||
<put-attribute name="body" value="/WEB-INF/jsp/contact.jsp" />
|
||||
</definition>
|
||||
|
||||
</tiles-definitions>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE tiles-definitions PUBLIC
|
||||
"-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
|
||||
"http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
|
||||
|
||||
<tiles-definitions>
|
||||
|
||||
<definition name="test" template="/WEB-INF/tiles/test.jsp"/>
|
||||
|
||||
</tiles-definitions>
|
||||
Reference in New Issue
Block a user