Oct 04 2008

Getting started with Apache tiles2 and struts2

Published by Gilles at 11:09 am under Java, Programming, Struts, Web

Tiles definitions

In your WEB-INF directory, add a tiles.xml file in which you will define .

XML:
  1. "-//Apache Software Foundation//DTD Configuration 2.0//EN"
  2. "http://struts.apache.org/dtds/-config_2_0.dtd">
  3. <-definitions>
  4. <definition name="header" template="/fragments/header.jsp">
  5. </definition>
  6. </-definitions>

See tiles doc for more info

Jsp usage

In your jsp, include the tag lib and insert the definition.

JAVA:
  1. <@ taglib uri="/WEB-INF/-jsp.tld" prefix="">
  2. <:insertdefinition name="header">
  3. </:insertdefinition>

Pages: 1 2 3 4

Trackback URI | Comments RSS

Leave a Reply