Search This Blog

Wednesday, February 08, 2006

What Is Tiles in Struts?

Before we actually develop the web application we need to decide about the
layout of the pages. Most of the websites uses the layout. Once the layout isdesigned, the designers create the template according to the layout.


In above ex the webpage split-up into multiple pieces we can treat these pieces as tiles. Tiles framework can be used to design the web pages with a consistent look.

As part of tiles plug-in we have support for a set of tags, as part of tiles tag lib we have the support importattribute, useattribute, getasstrin, get, beanname, add, put, insert… To use struts tiles framework

we need to define a layout or use the layout files that are provided as part of the tiles. Once the layout is defined we can use the same layout as part of multiple pages. We can design the websites using the layout shown below, for this we will define a layout that splits the page into 3 parts.

As part of tiles we get a set of standard layouts these layouts are available in \layout.Instead of defining the layouts in jsp files we can create a layout definition.We store the definition of layout in xml file.

No comments: