aspose file tools*
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
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
Author

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" />
</jsp:include>

This was what we were doing previously .

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

</definition>

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 ,
anagha
sanat
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: http://aspose.com/file-tools
 
subject: struts & tiles - passing a file name using tiles