jQuery in Action, 3rd edition
The moose likes Struts and the fly likes How tiles are resolved in a JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How tiles are resolved in a JSP page" Watch "How tiles are resolved in a JSP page" New topic

How tiles are resolved in a JSP page

amitesh kumar
Ranch Hand

Joined: Aug 01, 2006
Posts: 50

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" />

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

Thanks in advance,
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
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
I agree. Here's the link: http://aspose.com/file-tools
subject: How tiles are resolved in a JSP page
It's not a secret anymore!