• 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
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Tiles problem in rendering

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,

I have a web application that uses tiles. Following are my definitions.

In my web.xml,

<welcome-file-list>
<welcome-file>/pages/index.jsp</welcome-file>
</welcome-file-list>

<!-- START ******************** All Servlet Context Parameters ********************* -->
..... other stuff defines here....

<context-param>
<param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
<param-value>/WEB-INF/classes/config/common/tiles-common.xml, /WEB-INF/classes/config/user/tiles-user.xml</param-value>
</context-param>



My index.jsp is,

>

My tiles-common.xml is,



The struts-common.xml is defined as,


The problem is that when I start my webapp, I land in index.jsp which in turn calls the welcome action and I end up seeing the landing page with the tiles layout applied. But later when I click another link say meetup from the menu.jsp, I get the result but with no tiles layout applied??

 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess I made some mistakes. Corrected my tiles definition like.



But still left with the same problem??
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,

Can anyone out here please help me. I'm not sure as to why my layout would not be applied to other pages. But is works only for the home screen that I have defined in my welcome file list.


The index.jsp looks like:



The action mapping looks like:



The tiles definition looks like:


 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So here are the screenshots:

ClickedHomeFromMenu.jpg
[Thumbnail for ClickedHomeFromMenu.jpg]
HomeScreen.jpg
[Thumbnail for HomeScreen.jpg]
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As you can see from the above screenshots that the layout and styles are gone as soon as I clicked the home link on the left hand menu. Why should this happen? What is that I'm doing wrong here?
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK. I figured this out. The problem was that for the css I should use a path like this:



But rather I was using it as:



which was wrong.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic