• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

struts tiles: would you recommend it?

 
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Would anyone care to share their view on struts tiles ?
In particular, we have an application where most pages follow a standard template (header, footer, navigation bar, etc).
My dilemma is basically between:

1) Using < tiles-definitions > , so that struts would automatically assign templates to pages.
The main downside of this solution appears to be that all requests *must* go through struts; even simple links to static info(currently, my company's standard is: if a link triggers some business logic - such as searching the database - then it naturally goes through a struts action . But if it's a simple navigational link leading to static info, such as the company's profile, then we use a simple < a href = "/myPage.html" > . Otherwise, the struts-config file becomes a monster ).

2) Using struts tiles without < tiles-definitions >.
Each page would declare an < insert > to associate itself with the required template, something like

The main downside: extra pages to maintain (in this example, one needs both the high-level "myPage.jsp" and the internal "myPageBody.jsp").

3) Giving up on struts tiles, and using style sheets (css) with < div > tags to define the page layout, and appropriate < jsp:include > when necessary. Less powerful than struts tiles, but a valid option.

Which method would you prefer ?

Thanks very mcuh
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am building a static webpage using Struts & Tiles. I think it is very easy to use, onve you have set it up properly.

My layout is classic: header, footer, menu and content. I have only two layout pages (one for the home (no menu) and one for all the other pages (with menu)). Like this I only have to change the content pages, ie the resources.application properties file. I also use css to define the layout.
My content pages do not differ in layout though.
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might want to take a look at SiteMesh.
 
reply
    Bookmark Topic Watch Topic
  • New Topic