struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Reddin <>
Subject Re: Tiles without Struts
Date Wed, 09 Nov 2005 14:17:33 GMT

On Nov 8, 2005, at 9:23 PM, Paul Benedict wrote:

> I have gone to this link:
> I am looking for those 3 WAR files listed but I can't find them.  
> The link in this paragraph is
> broken so I can't get to the distribution: "First, download a  
> binary distribution of Tiles by
> following the instructions <<--here-->>. Then, make sure you have  
> downloaded and installed the
> prerequisite software packages described above."
> Someone needs to fix the website.

The website is out of date.  I'm in the process of fixing it in svn  
but haven't copied it over to the site directory yet - maybe today?   
Those .war files are not being built anymore.

You should be able to configure the Tiles Servlet like this:

       <servlet-name>Tiles Servlet</servlet-name>

> In any event, I want to know if anyone has used Tiles without  
> Struts. If you're doing the XML
> method, I know you need a controller in the middle to decide which  
> Tile to load. So that's really
> Struts or Spring. Has anyone done that? Just wanting to know.

You don't have to use a controller servlet.  You can insert a tile  
from a JSP.  It's not pretty, but here's how it might be done:

In tiles-defs.xml

<definition name="main" path="/mailLayout.jsp">
   <put name="body" value="/body.jsp"/>

<definition name="child" extends="main">
     <put name="body" value="/aPage.jsp"/>

In your web app you'd have the following JSPs:


/aPageTiles.jsp would look like this:

<tiles:insert definition="child"/>

Then you would link to /aPageTiles.jsp.  I know this isn't elegant,  
but it works.  I'm looking at better ways to do this sort of thing  
with Standalone Tiles using a Filter or something.


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

View raw message