File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Tiles Question - howto solve variety body ? 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 "Tiles Question - howto solve variety body ?" Watch "Tiles Question - howto solve variety body ?" New topic

Tiles Question - howto solve variety body ?

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, good day and merry christmas ..i have an question in tiles , currently
i using the following template as my webpage layout

- header - location : top
- navigation menu - location : left center
- body - location : right center
- footer - location : bottom

so i create index page as follow :

there have several index which use to populate the same layout but different body through the navigation links by defined in navbar.jsp

say i have link1,link2,link3 as navigation links
when click link1, the same layout will display with body1.jsp and same as when click link2, the same layout will display with body2.jsp

my question is , while these body1,body2.jsp ..are actually as main page with several button reside, when user click on different button, it will fire different respective action, after finish the action, it will go to different other result pages, as my case, should i have another few index page for different result pages ?

can someone please suggest some idea to solve the problem ? thank you very much for your time
[ December 26, 2004: Message edited by: Alvin chew ]
Tad Dicks
Ranch Hand

Joined: Nov 16, 2004
Posts: 264
Do you have a Tiles-def.xml file?
You can create various definitons of pages.

Then you can extend this:

inside of your "default.jsp"
you would use these tags:

You would want to add some static html inside of the default.jsp so that everything looks formated properly (possibly using table tags) and possibly some "banner graphics" or any other content you want available on each page.

Then inside of your struts-config file you refer to the definition names instead of individual jsp pages.

hope that helped.

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
thank you, Tad Dicks for explanation ..
I agree. Here's the link:
subject: Tiles Question - howto solve variety body ?
Similar Threads
anyone face Error - tag.getAsString : component context is not defined?
Tiles in struts?
Interesting tiles/struts making a menu question
Definition Using A definition
Need your help on tiles urgently ~~