J F W

making web application programming easier is possible

HOW TO : WEBAPP

tiles-defs.xml

The configuration of the tiles is not complex, but can be tricky if not considered with a jsp that uses tiles. Let's see an example:

In the previous example, we have defined a menu used in various jsps ("project_common_menu_def") and a layout ("project_std_layout"). In the layout, is defined, how the pages will be displayed. Also, we have declared two parameters for the layout: "title" is a constant string that can be used for setting the title of the html; "project_common_bottom" is a jsp, defined previously, to be included in all the pages.

We can use the layout in that way ("home_tile.jsp"):

In the code above, the layout (html) defined in "project_std_layout" is used, and its "content" is the jsp "home.jsp".