Tiles fool-style entry -hajavaor-
/ / ============================
Author: hajavaor
Email: hajavaor@eyou.com
QQ: 19843788
/ / ============================
0, Applicable Readers: Understand Tag Lib, use struts (of course, tiles belongs to Struts.)
1. There is a file named Test.jsp. The content is as follows:
this is the header. body> html>
this is the body. body> html>
this is the footer. body> html>
2. Remove this document as three documents, respectively:
Test_Header.jsp
this is the header. body> html>
Test_body.jsp
this is the body. body> html>
TEST_FOOTER.JSP
this is the footer. body> html>
3. Modify the Test.jsp file and use the Tiles tab. This is my first TILES example.
The original file became four files. Continue to see.
4, change the above file to the following two files:
Test_Template.jsp, this is a template file.
body>
html: html>
Change Test.jsp to this:
tiles: insert>
5, further modify, edit a Tiles-Defs.xml file, the content is:
definition>
Modify Test.jsp file content:
It turns into a code, it is very simple.
How, do you know how tiles taken away, even if you get started, look at Tiles API.
The purpose of this article is to let you build Tiles concept, and how to use it, please see the relevant documentation.