aspose file tools*
The moose likes Struts and the fly likes Tiles problem in rendering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tiles problem in rendering" Watch "Tiles problem in rendering" New topic
Author

Tiles problem in rendering

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9622
    
    2

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??


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9622
    
    2

I guess I made some mistakes. Corrected my tiles definition like.



But still left with the same problem??
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9622
    
    2

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 Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9622
    
    2

So here are the screenshots:



[Thumbnail for ClickedHomeFromMenu.jpg]

[Thumbnail for HomeScreen.jpg]

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9622
    
    2

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 Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9622
    
    2

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tiles problem in rendering