Tiles Tutorial

Introduction to Tiles

Tiles framework was previously called Components framework, Tiles is a open source framework for making the presentation layer work much easier by elimination of lot of rework and repeated codes. Tiles are very useful where a common look and feel among all pages are needed, tiles makes the code maintenance very easy, tiles makes a separation of layout from content

Tiles builds on the "include" feature provided by the JavaServer Pages specification thus letting you more feasibly create reusable pages. It helps to provide a full-featured, robust framework for assembling presentation pages from component parts. Each part ("Tile") can be reused as often as needed throughout your application. This reduces the amount of markup that needs to be maintained and makes it easier to change the look and feel of a website. You should think of tiles as visual components.

A tile layout is a special JSP page that allows tiles to be placed. Tile layouts dictate where the tiles will be laid out on the page. In many respects the tile layout resembles a template layout. In fact, if you have used Struts templates before, then you will note that the Tile framework is backwards compatible with the template custom tag library.

The Tiles framework's view components are known as tiles. The framework uses an XML configuration file to organize those tiles. This framework not only enables you to reuse tiles, but also the layouts that organize them.

To use Tiles in your project, you need following library :

tiles.jar
commons-digester.jar
commons-beanutils.jar
commons-collections.jar
tiles.tld

.

Tiles tutorial
Introduction to Tiles
Web Page Layouts
JSP pages with embedded HTML
JSP pages with JSP include directive's (static) or JSP actions (dynamic)
JSP templates
Tiles
Layouts
Classic layout
Menu layout
Vertical box or vbox or vstack layout layout
Multi-columns layout
Center layout
Tabs layout
Installing Tiles
For Struts1.0
For Struts1.1
For Tiles stand alone
Configuring Tiles
Internationalizing Tiles
Create a Tile Layout
Use a Tile Layout
Create a Tile Definition
Use a Tile Definition
Use of this website constitutes acceptance of the AllAppLabs.com Terms and Conditions