File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes struts & tiles - passing a file name using tiles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts & tiles - passing a file name using tiles" Watch "struts & tiles - passing a file name using tiles" New topic

struts & tiles - passing a file name using tiles

pendse anagha
Ranch Hand

Joined: Mar 09, 2005
Posts: 44
Hello ,
We are presently using struts 1.1
We are also using tiles .

In our Tiles layout - we have a common header , left navigation and a footer
The main body changes as per the page requested.

Previously we had a screen specific JSP - just a wrapper JSP
This jsp would include the common template and we would pass the actual body required.

Here is what we were doing previously -

<jsp:param name="myBody" value="loginBody.jsp" />

This was what we were doing previously .

Now when I am using tiles here is what I am doing ( in tiles.xml ) :


Here is the common Template definition

The above code is an example
How do I dynamically pick the JSP in the common template and show it ?

Is there a possibility in tiles to pass a jsp to the other tile similar to <jsp:inlcude /> & <jsp:param /> ?

Thanks in advance ,
Ranch Hand

Joined: Dec 08, 2004
Posts: 111

What you can do here is put the jsp file in some property entry and use same <tiles ut> to pick it. like

now you need to change the jsp page in resource bundle only.
I agree. Here's the link:
subject: struts & tiles - passing a file name using tiles
Similar Threads
Tiles. Decorator. What is the right way?
Tiles question
ERROR RenderTagSupport:103 - Error during rendering
confusion on struts tile
struts2 tiles problem