Wendy, the source code for Struts-Atlanta does some of what (I think) you
are wanting to do.

Feel free to download it from either

 http://www.open-tools.org/struts-atlanta/downloads (as a zip)

 or

 http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/struts/struts-atlanta/ (cvs
view)




James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org

"If you were plowing a field, which would you rather use? Two strong oxen or
1024 chickens?"
- Seymour Cray (1925-1996), father of supercomputing


> -----Original Message-----
> From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 20, 2002 1:26 PM
> To: 'Struts Users Mailing List'
> Subject: [tiles] relative paths for the .jsp files
>
>
>
> 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
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to