This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How tiles are resolved in a JSP page

 
amitesh kumar
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am developing a struts based web application that extensively uses tiles mechanism. I am not able to understand "how and when the tiles are resolved?"

I am attaching code snippets of "editUser.jsp" page:

<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<tiles:insert template="/layouts/maintlayout.jsp">
<tiles ut name="viewtitle" value="Edit User" />
<tiles ut name="header" value="/common/header.jsp" />
<tiles ut name="menu" value="/common/menu.jsp" />
<tiles ut name="footer" value="/common/footer.jsp" />
<tiles ut name="maintBody" value="/tiles/maint/editUserDetail.jsp" />
</tiles:insert>


In this code please explain me how the tiles are getting resolved?

Thanks in advance,
Amitesh
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not clear what you are asking. I assume that if you look at the file maintlayout.jsp you will see a number of tiles:insert tags (like <tiles:insert attribute="viewtitle" /> or <tiles:insert attribute="maintBody" />). These get replaced by the values and jsp pages specified in your tiles:put tags.

- Brent
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic