`
- 浏览:
95254 次
- 性别:
- 来自:
济南
-
0、适用读者:了解Tag lib,使用Struts(当然了,Tiles属于Struts嘛。)
1、有一个文件,名为test.jsp。内容如下:
<</span>html><</font>body>This is the header.<</font>/body><</font>/html>
<</font>html><</font>body>This is the body. <</font>/body><</font>/html>
<</font>html><</font>body>This is the footer. <</font>/body><</font>/html>
2、拆此文件为三个文件,分别为:
test_header.jsp
<</font>html><</font>body>This is the header.<</font>/body><</font>/html>
test_body.jsp
<</font>html><</font>body>This is the body.<</font>/body><</font>/html>
test_footer.jsp
<</font>html><</font>body>This is the footer.<</font>/body><</font>/html>
3、修改test.jsp文件,使用tiles标签。这便是我的第一个tiles例子了。
page="test_header.jsp"/>
page="test_body.jsp"/>
page="test_footer.jsp"/>
由原来的一个文件变成了四个文件。继续看。
4、将上面的文件再换成下面两个文件:
test_template.jsp,这是一个模板文件。
<</font>head><</font>title><</font>/title><</font>/head>
<</font>body>
attribute="header"/>
attribute="body"/>
attribute="footer"/>
<</font>/body>
将test.jsp改成这样:
page="/test_template.jsp"
flush="true">
name="header"
value="/test_header.jsp"
/>
name="body"
value="/test_body.jsp"
/>
name="footer"
value="/test_footer.jsp"
/>
5、再进一步修改,编辑一个tiles-defs.xml文件,内容为:
name="MyTilesTest"
path="/test_template.jsp">
name="header"
value="/test_header.jsp"
/>
name="body"
value="/test_body.jsp"
/>
name="footer"
value="/test_footer.jsp"
/>
修改test.jsp文件内容为:
definition
name="MyTilesTest"
/>
就变成一句代码了,很简洁吧。
怎么样,你知道Tiles是怎么回事了吧,就算入门了,赶紧看Tiles的API吧。
本文的目的只是让你建立Tiles的概念,而具体如何使用,请看相关文档
分享到:
Global site tag (gtag.js) - Google Analytics
相关推荐
Tiles框架入门教程示例(含Springmvc),简单的springmvc整合tiles框架,maven管理
jsf入门小列子和 jsf与Tiles结合小列子, 可以帮助初学都快迅入门
帮你理解tiles的使用,快速入门,进行企业开发
struts中tiles标签简介,Tiles框架可以令我们组合可以复用的Tiles来搭建网页。
spring 结合 tiles
cesium的3d-tiles转换工具,将 .obj 模型转换为 3D Tiles的格式,内附使用文档
tiles in struts2, how we can use the tiles to show the infeormation, good example
离线tiles文件
还在为找不到jar文件烦心吗,不用了到我空间来有你想要的,持续更新。。。 tiles-api-2.0.6.jar,tiles-core-2.0.6.jar,tiles-jsp-2.0.6.jar
tiles教程 tiles教程 tiles教程
These fragments, or tiles, can be used as simple includes in order to reduce the duplication of common page elements or embedded within other tiles to develop a series of reusable templates....
tiles官方包(含文档) tiles官方包(含文档) tiles官方包(含文档) tiles官方包(含文档) tiles官方包(含文档) tiles官方包(含文档) tiles官方包(含文档)
Apache Tiles3整合SpringMvc Apache Tiles3整合SpringMvc
struts中web网页布局框架struts-tiles,简单配置就可。
tiles2.0 jar包
Struts2 tiles操作例子,附带demo代码
struts2.0 整合tiles 配置
spring+tiles开发,其中包含了tiles中所需的所有tiles包,(注意适合spring3.0以上使用开发)
tiles2.1.2一个很好的前端框架技术,非常适合管理类页面架构
Tiles框架具有如下特性: ·创建可重用的模板 ·动态构建和装载页面 ·定义可重用的Tiles组件 ·支持国际化 <br> Tiles框架包含以下内容: ·Tiles标签库 ·Tiles组件的配置文件 ·...