Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Tiles problem

 
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 ]
 
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
 
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
 
Curse your sudden but inevitable betrayal! And this tiny ad too!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic