aspose file tools
The moose likes Struts and the fly likes Tiles problem in rendering Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply 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: 8795

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, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 8795

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: 8795

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: 8795

So here are the screenshots:



[Thumbnail for ClickedHomeFromMenu.jpg]

[Thumbnail for HomeScreen.jpg]

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 8795

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: 8795

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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Tiles problem in rendering
 
Similar Threads
how to fire struts2 action from tiles2 definition
Struts2 :Tiles request page without action class
There is no Action mapped for namespace / and action name welcomeLink. - [unknown location]
Tiles 2.x.x Question
t:jscookMenu with Tiles