struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: Struts2 and Tiles, still not clear for me :(
Date Fri, 06 Apr 2007 10:40:33 GMT
--- Pedro-1 <> wrote:
> Could some one give me a pointer to a simple example
> showing all the configuration files, and where to
> them?

-- web.xml fragment

  - If you want to use tiles config files other
  - than the default /WEB-INF/tiles.xml you can
  - configure them with a context-param.
  - This is optional but I think it helps a lot.
    CSV list of Tiles 2.0 configuration files.


-- tiles.xml fragment

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE tiles-definitions PUBLIC
    "-//Apache Software Foundation//DTD Tiles
Configuration 2.0//EN"

  <definition name="/"
    <put name="title" value="Sanity Check"/>

  <definition name="layout"
    <put name="title" value="!!! DEFAULT TITLE !!!" />

  <definition name="/" extends="layout">
    <put name="title" value="Home" type="string" />
    <put name="body" value="/WEB-INF/jsp/home.jsp" />

  <!-- Etc. -->

-- layout.jsp (just to show insertions of attributes)

<%@ taglib prefix="tiles"
    <title><tiles:getAsString name="title"/></title>
    <tiles:insertAttribute name="body" />


Don't get soaked.  Take a quick peek at the forecast
with the Yahoo! Search weather shortcut.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message