Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tiles problem

 
Raj Bhandari
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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 search.page 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 ?
Tks
[ April 11, 2006: Message edited by: Raj Bhandari ]
 
Kumar Hanu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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" />
</plug-in>

Hope this solves your ploblem.
 
Raj Bhandari
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Change your base layout page from
to

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.

Liju
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic