Given the following structure:
/path/to/tomcat/webapps/myApp/three.jsp
/path/to/tomcat/webapps/myApp/four.jsp
/path/to/tomcat/webapps/myApp/WEB-INF/jsp/one.jsp
/path/to/tomcat/webapps/myApp/WEB-INF/jsp/two.jsp
/path/to/tomcat/webapps/myApp/WEB-INF/jsp/header.jsp
/path/to/tomcat/webapps/myApp/WEB-INF/jsp/footer.jsp
/path/to/tomcat/webapps/myApp/WEB-INF/jsp/menu.jsp

When I use classicLayout, all of the "put" calls seem to be relative to the
location of the layout file:

<tiles:insert page="WEB-INF/jsp/classicLayout.jsp" flush="true">
  <tiles:put name="title"  value="My first page" />
  <%-- these are relative to the location of the layout,
       so it's looking in WEB-INF/jsp/    --%>
  <tiles:put name="menu"   value="menu.jsp" />
  <tiles:put name="body"   value="one.jsp" />
  <tiles:put name="header" value="two.jsp" />
  <%-- must back up out of WEB-INF to get other files --%>
  <tiles:put name="footer" value="../../four.jsp" />
</tiles:insert>

However, for vboxLayout, this is not the case:

<tiles:insert page="WEB-INF\jsp\vboxLayout.jsp" flush="true" >
  <tiles:putList name="list" >
    <%-- must specify path relative to the webapp root --%>
    <tiles:add value="WEB-INF\jsp\header.jsp" />
    <tiles:add value="WEB-INF\jsp\aBody.jsp" />
    <tiles:add value="three.jsp" />
    <tiles:add value="four.jsp" />
    <tiles:add value="WEB-INF\jsp\footer.jsp" />
  </tiles:putList>
</tiles:insert>

Also I just noticed that vboxLayout only works with the '\' separator.  If I
switch to '/' it can't seem to find any of the files. :(  This is running
under Tomcat 4.1.14 and the Struts nightly build from the 18th.  

If '/' does not work on Windows, when I move this to HP-UX I suspect that
'\' will stop working.

Is this the expected behavior?  I found it a little confusing as a tiles
newbie.

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

Reply via email to