Link to home
Start Free TrialLog in
Avatar of FelineConspiracy
FelineConspiracy

asked on

A Tiles question, about putList I think

A complete newbie to Tiles, I have a page like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri='/WEB-INF/struts-tiles.tld' prefix='template' %>
<template:insert page='/template/template.jsp'>
  <template:put name='title' value='Foo - Bar Response'/>
  <template:put name='header' value='/template/header.jsp' />
  <template:put name='error' value='/template/error.jsp' />
  <template:put name='sidebar' value='/template/sidebar.jsp' />
  <template:put name='content' value='/content/providerInquiryResultsContent.jsp'/>
  <template:put name='footer' value='/template/footer.html' /> 
</template:insert>

Open in new window


My requirement is to insert some additional jsp content -- for example moreStuff.jsp -- into the sidebar after /template/sidebar.jsp, which I cannot modify. As far as I can tell I do that with a putList, but what is the syntax?

As an aside I have not been able to find any central definition of templates as the tiles-defs.xml is almost empty and I don't see any other suspects. So I'm not clear whether I make changes here only or somewhere else first.
ASKER CERTIFIED SOLUTION
Avatar of mccarl
mccarl
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In Tiles we can define the definition in the tiles-defs.xml which specifies the different components to "plugin" to generate the output. This eliminates the need to define extra jsp file for each content file.

Here is interesting link

http://www.roseindia.net/struts/using-tiles-defs-xml.shtml
Avatar of FelineConspiracy
FelineConspiracy

ASKER

Thank you. In this case I think I will reverse direction and bring sidebar.jsp into my page. My page is a special case in that there is no form for the user to fill out so I really cannot use the template profitably anyway.