• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Tiles problem

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic