You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by lightbulb432 <ve...@hotmail.com> on 2007/06/17 03:19:38 UTC

Relative path issues

Can someone please explain what paths in Tiles are relative to? I have a JSP
in /context/WEB-INF/jsp/ that references a template in /context/, but I'm
unable to get to it by referring to tiles:insertTemplate
template="/templateName.jsp". This worked before when the containing JSP was
in /context rather than its current location.

What's the definitive word on whether paths are relative to the context
root, the containing page, the path used to request the resource, etc?

What should I refer to to make this work? Hopefully I don't have to include
the context name in the relative path, because the context path may change.
I hope whatever Tiles paths are relative to is, in turn, relative to the
context path, to avoid this problem.

Thanks.
-- 
View this message in context: http://www.nabble.com/Relative-path-issues-tf3934783.html#a11159665
Sent from the tiles users mailing list archive at Nabble.com.


Re: Relative path issues

Posted by Antonio Petrelli <an...@gmail.com>.
2007/6/17, lightbulb432 <ve...@hotmail.com>:
>
> Can someone please explain what paths in Tiles are relative to? I have a JSP
> in /context/WEB-INF/jsp/ that references a template in /context/, but I'm
> unable to get to it by referring to tiles:insertTemplate
> template="/templateName.jsp". This worked before when the containing JSP was
> in /context rather than its current location.
>

> What's the definitive word on whether paths are relative to the context
> root, the containing page, the path used to request the resource, etc?

Paths are (or better should be) always context-relative. For example,
if you use:
<tiles:insertTemplate template="/templateName.jsp" />
it will refer to "/context/templateName.jsp".
If it does not work, that probably it's a bug.
Can we see how you refer to this JSP page?

Antonio