This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes How do i change only body page in tiles.xml file in struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How do i change only body page in tiles.xml file in struts2" Watch "How do i change only body page in tiles.xml file in struts2" New topic
Author

How do i change only body page in tiles.xml file in struts2

anil kumar mullapudi
Greenhorn

Joined: Oct 25, 2011
Posts: 8

my tiles.xml
---------------
<definition name="baseLayout" template="/Layouts/baseLayout.jsp">
<put-attribute name="title" value="Template"/>
<put-attribute name="header" value="/Layouts/header.jsp"/>
<put-attribute name="menu" value="/Layouts/menu.jsp"/>
<put-attribute name="body" value="/Layouts/body.jsp"/>
<put-attribute name="footer" value="/Layouts/footer.jsp"/>
</definition>

<definition name="welcome" extends="baseLayout">
<put-attribute name="title" value="Welcome"/>
<put-attribute name="body" value="/Layouts/welcome.jsp"/>
</definition>

in my struts.xml file i have so many result pages, so i need write tiles definitions for each result page. And every time i want to change only body page of my base layout. Is it possible with one tiles definition for all results and if possible how to pass our dynamic result page to that body tile definitions in tiles.xml file.
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Yes, you can do it.


ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do i change only body page in tiles.xml file in struts2
 
Similar Threads
Facing an issue trying to use Struts 2.0.14 with Tiles 2.0.
using css file in jsp along with tiles
Struts2 :Tiles request page without action class
Problem with tiles.
Struts2 CannotRenderException