使用方法见: http://blog.csdn.net/jiangyu1013/article/details/53161580
1.加maven 依赖:
<!-- 页面布局 -->
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>3.0.5</version>
</dependency>
2. 在spring-servlet.xml 中配置:
<!-- tiles 标签 -->
<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
<property name="definitions">
<list>
<value>/WEB-INF/tiles/tiles-definitions.xml</value>
</list>
</property>
</bean>
3.书写 tiles-definitions.xml :
<?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>
<!-- Default Main Template -->
<definition name="defaultTemplate" template="/WEB-INF/jsps/common/layout.jsp">
<put-attribute name="title" value="布局页" type="string" />
</definition>
</tiles-definitions>
4.使用 :
使用方法见: http://blog.csdn.net/jiangyu1013/article/details/53161580