File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
struts & tiles - passing a file name using tiles
Joined: Mar 09, 2005
Mar 13, 2005 21:15:00
We are presently using
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
- 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 ) :
<definition name="logon" page="/login/logon.jsp"> <put name="commonTemplate" value="/myApp/WebcastTemplate.jsp"/>
Here is the common Template definition
<definition name="commonTemplate" page="/CommonTemplate.jsp"> <put name="commonHeader" value="/CommonHeader.jsp"/> <put name="Nav" value="/CommonNav.jsp"/> <put name="Footer" value="/CommonFooter.jsp"/> [B]<put name="Body" value="/login/LoginBody.jsp"/> <put name="Body" value="/list/ListBody.jsp"/>[/B]
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 ,
Joined: Dec 08, 2004
Mar 14, 2005 06:10:00
What you can do here is put the jsp file in some property entry and use same <tiles
ut> to pick it. like
<tiles :-P ut name="somepage" value="app.somepage" />
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
Tiles. Decorator. What is the right way?
ERROR RenderTagSupport:103 - Error during rendering
struts2 tiles problem
confusion on struts tile
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013