开发学院软件开发Java SSH笔记五 整合Tiles2 阅读

SSH笔记五 整合Tiles2

 2009-09-23 00:00:00 来源:WEB开发网   
核心提示: 3.创建Tiles模版以及需要的内容页layout.jsp<%@pagelanguage="java"contentType="text/html;charset=UTF-8"pageEncoding="UTF-8"%>&l

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>

Tags:SSH 笔记 整合

编辑录入:爽爽 [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接