Struts1之Titles框架 Demo
1.struts-config.xml文件:
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config" value="/WEB-INF/classes/tiles-definitions.xml" />
<set-property property="definitions-parser-validate" value="true" />
</plug-in>
2.tiles-definitions.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
<tiles-definitions>
<definition name="listTiles-definition" path="/tiles/momo.jsp">
<put name="title" value="www.lenovo.com"></put>
<put name="header" value="/tiles/header.jsp">
</put>
<put name="sidebar" value="/tiles/sidebar.jsp">
</put>
<put name="content" value="/tiles/content.jsp">
</put>
<put name="footer" value="/tiles/footer.jsp">
</put>
</definition>
</tiles-definitions>
3.模板:momo.jsp
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<html>
<head>
<title><tiles:insert attribute="title"/></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="100" colspan="2" valign="top"><tiles:insert attribute="header"/></td>
</tr>
<tr>
<td width="300" valign="top"><tiles:insert attribute="sidebar"/></td>
<td width="73%" valign="top"><tiles:insert attribute="content"/></td>
</tr>
<tr>
<td height="50" colspan="2" valign="top"><tiles:insert attribute="footer"/></td>
</tr>
</table>
</body>
</html>
4.index.jsp调用该tiles组件:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
<tiles:insert definition="listTiles-definition"/>
分享到:
相关推荐
struts结合titles的一个小例子,当备用。
Struts1 标签手册,5类标签库,html,nested,logic,bean,titles
第二次做关于struts的开发 受益良多~ 做的很基础 适合
The streaming service’s number of movies has decreased by more than 2,000 titles since 2010, while its number of TV shows has nearly tripled. It will be interesting to explore what all other ...
React-titles演示
一个漂亮,易用简单的提示框sweet-titles 鼠标落上 鼠标落下 很实用
通过titles的类型查询对应信息 Titles t=new Titles(); List<String> type=dao.getalltype(t); for(String types:type){ System.out.println(types); } HibernateSessionFactory.closeSession(); }
一个基于 struts1.2+spring+tomcat数据源的...布局采用struts的titles标签 数据的CRUD采用spring的JDBCTemplate 里面做了权限控制 用到了tomcat数据源(比较老的技术) 部署非常简单,里面有详细说明文档 毕设的好材料
Struts Tiles标签学习PPT教学文档
45.将titles_test表名修改为titles_2017.md
Study on the Translation of English Film Titles from the Perspective of Eco-translatology.zip
title框架例子..........
大气金色粒子活动颁奖典礼文字标题片头 Awards Titles 3TJ008004
Laravel开发-titles Laravel 5.1的优雅标题生成器
Oracle9i Database Documentation Titles and Part Numbes
管理员登陆,采用struts titles 布局页面。可输入关键字查询学生,列出全部学生信息,增加,删除,修改,查询,分页等等,各个小功能点一应俱全。是个ssh学习的不错例子。使用tomcat 作为web服务器,sqlserver2000...
13.从titles表获取按照title进行分组.md
14.从titles表获取按照title进行分组2.md
On_the_Translation_of_Film_Titles.doc
by Using Account Titles in China我国会计要素的简单核算.pptx