• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Nesting Tiles

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to nest a struts-tile within a struts-tile. Here is what I have now:

Layout.jsp


tile-def.xml


body.jsp


bodyEdit.jsp



What I would like to do is replace the <%@ include %> statement in body.jsp with a <tile:insert> and in the tiles-def.xml <put> "myPackage.jsp" or "myPackageEdit.jsp" in when appropriate. It doesn't make sense to have to create two maybe more separate body.jsp's just to have different <%@ include %>s. Placing the content of body.jsp into Layout.jsp with the <%@ include %> works fine but when I change the <%@ include %> to the <tiles:insert attribute="body" /> and use the tiles-def.xml to <put attribute="body" name="jsp/myPackage.jsp" /> it does not render the page. Is there a way form me to not have to create multiple pages just to have different <%@ include %>s?
 
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your post bit confusing to me. Just post how it is working now and how you are expecting to work? And It's better idea to create basic template and extend it to new definitions and override the tag's whatever you want. Extending Definitions
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!