SSH笔记五 整合Tiles2
2009-09-23 00:00:00 来源:WEB开发网3.创建Tiles模版以及需要的内容页
layout.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tiles-jsp.tld" prefix="tiles" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<title><tiles:insertAttribute name="title" /></title>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
</HEAD>
<BODY>
<table>
<tbody><tr>
<td><tiles:insertAttribute name="head"/></td></tr>
<tr>
<td><tiles:insertAttribute name="content"/></td></tr>
<tr>
<td><tiles:insertAttribute name="foot"/></td></tr>
</tbody></table>
</BODY>
</HTML>
head.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
this is head
content.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<table height="420px">
<tr><td>this is body</td>
</tr>
</table>
更多精彩
赞助商链接