File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Tiles problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tiles problem" Watch "Tiles problem" New topic

Tiles problem

Raj Bhandari
Ranch Hand

Joined: Oct 19, 2005
Posts: 97

Can someone please help me figure out this problem while trying to use tiles:

I have a page index.jsp as follows:

In my tiles-defs.xml:

In mainLayout.jsp:

Now the issue is that in my struts-config.xml, I following which works fine..

but when I change the forward (within global-forward) to use tiles like below:

the url doesn't get changed to search.jsp as should be according to the tiles-defs.xml and hence, I can't get to search.jsp.

Does, someone has an idea why this forward path isn't mapping properly.

The tiles work fine if its in my <action-mapping> just not forward. Any ideas please ?
[ April 11, 2006: Message edited by: Raj Bhandari ]
Kumar Hanu

Joined: Sep 18, 2004
Posts: 5
To use tiles-defs.xml u should have the tiles plugin defined in your struts-config.xml. Something link the following

<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />
<set-property property="definitions-parser-validate" value="false" />

Hope this solves your ploblem.
Raj Bhandari
Ranch Hand

Joined: Oct 19, 2005
Posts: 97
Thanks Kumar for the reply but I'm already doing that and tiles works for me when using in action mapping, just not on global-forwards. This is my first time using tiles.. so I'm not sure what else should I look for. Tks
Liju Cherian
Ranch Hand

Joined: Mar 17, 2006
Posts: 44
Change your base layout page from

With the help of the above mentioned code, you'll be able to identify if there is any error, present in the pages rendered using this layout.
Hope this helps.


"What's in a name? That which we call a rose by any other name would smell just as sweet."<br />(William Shakespeare, Romeo and Juliet, Act II, Scene II)
I agree. Here's the link:
subject: Tiles problem
It's not a secret anymore!