Spring MVC集成Tiles3
来源:互联网 发布:mysql 查看用户连接数 编辑:程序博客网 时间:2024/05/17 01:52
1、添加依赖
<!-- Tiles Start --><dependency> <groupId>org.apache.tiles</groupId> <artifactId>tiles-servlet</artifactId> <version>3.0.7</version></dependency><dependency> <groupId>org.apache.tiles</groupId> <artifactId>tiles-jsp</artifactId> <version>3.0.7</version></dependency><!-- Tiles End -->
2、配置viewResolver
<bean id="viewResolver" class="org.springframework.web.servlet.view.tiles3.TilesViewResolver"></bean><bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer"> <property name="definitions"> <list><value>/WEB-INF/jsp/**/views.xml</value></list></property></bean>
3、在/WEB-INF/jsp下建立views.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><definition name="template" template="/WEB-INF/jsp/main_template.jsp"><put-attribute name="title" value=""></put-attribute><put-attribute name="header" value="/WEB-INF/common/header.jsp"></put-attribute><put-attribute name="content" value="/WEB-INF/jsp/defaultContent.jsp"></put-attribute><put-attribute name="footer" value="/WEB-INF/common/footer.jsp"></put-attribute></definition><definition name="home" extends="template"><put-attribute name="title" value="JBCP Pets:Home"></put-attribute></definition><definition name="accountHome" extends="template"><put-attribute name="title" value="JBCP Pets:Your Account"></put-attribute><put-attribute name="content" value="/WEB-INF/jsp/account/home.jsp"></put-attribute></definition><definition name="changePassword" extends="template"><put-attribute name="title" value="JBCP Pets:Change Password"></put-attribute><put-attribute name="content" value="/WEB-INF/jsp/account/changePassword.jsp"></put-attribute></definition><!-- session control --><definition name="concurrent" extends="template"><put-attribute name="title" value="JBCP Pets:Session Time"></put-attribute><put-attribute name="content" value="/WEB-INF/jsp/session/concurrent.jsp"></put-attribute></definition><definition name="listActiveUsers" extends="template"><put-attribute name="title" value="JBCP Pets:Active Users"></put-attribute><put-attribute name="content" value="/WEB-INF/jsp/account/listActiveUsers.jsp"></put-attribute></definition><definition name="accessDenied" extends="template"><put-attribute name="title" value="JBCP Pets: Access Denied"></put-attribute><put-attribute name="content" value="/WEB-INF/jsp/accessDenied.jsp"></put-attribute></definition><definition name="loginForm" template="/WEB-INF/jsp/loginForm.jsp"></definition></tiles-definitions>
0 0
- Spring MVC集成Tiles3
- spring mvc4集成tiles3
- tiles3 & spring
- spring3 集成tiles3
- spring spring mvc集成
- spring mvc 集成freemarker
- Spring MVC 集成 Velocity
- spring MVC集成Mybatis3
- Spring MVC 集成 Velocity
- spring mvc logback 集成
- Spring MVC集成 Log4j
- Thymeleaf MVC 集成Spring
- Spring MVC集成Tiles2
- spring mvc集成hibernate
- spring mvc 集成 ckfinder
- Spring MVC集成 Log4j
- Spring MVC 集成Velocity
- Spring MVC 集成 Thymeleaf
- shell中的命令替换
- 异常处理——异常处理简介之UnhandledExceptionFilter(1)
- 贪心算法
- 通过反射访问构造方法(学习笔记)
- Laravel5遇到的问题以及解决方案 -- PDOException SQLSTATE[HY000] [2002] No such file or directory
- Spring MVC集成Tiles3
- 宽度优先搜索
- jstl自定义函数的使用
- 基于QT的TCP协议实现的通信小程序
- bootstrap-table插件实现ajax服务端分页显示
- BZOJ2229: [Zjoi2011]最小割 分治最小割
- linux环境下wps及WebStorm等软件不能输入中文解决方案
- 1
- Leetcode 35 Search Insert Position