Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts & tiles - passing a file name using tiles

 
pendse anagha
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 111
Eclipse IDE Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic