You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Toby Hobson <to...@btinternet.com> on 2008/05/23 02:39:56 UTC
T5 assets and trailing slash on urls
I have a slight problem using assets (images and css files) my app. within Layout.tml I have:
<link href="${asset:context:styles/style.css}" rel="stylesheet" type="text/css" />
This works fine when I access the app at http://localhost/app/start for example. But when I try http://localhost/app/start/ the css and images are screwed. I've noticed that in the generated html, T5 creates relative references i.e. styles/style.css, not /app/styles/style.css
I've also tried to use the @IncludeStylesheet annotation in Layout.java but I get the same effect.
Has anyone else encountered this?
Thanks
Toby
Re: T5 assets and trailing slash on urls
Posted by Thiago HP <th...@gmail.com>.
On 5/22/08, Toby Hobson <to...@btinternet.com> wrote:
> <link href="${asset:context:styles/style.css}" rel="stylesheet" type="text/css" />
> This works fine when I access the app at http://localhost/app/start for example.
> But when I try http://localhost/app/start/ the css and images are screwed. I've
> noticed that in the generated html, T5 creates relative references i.e. styles/
> style.css, not /app/styles/style.css
It seems to me that Tapestry is generating wrong relative URLs for
your assets. Try setting the tapestry.force-absolute-uris symbol to
true in your AppModule. Maybe it helps.
(copied from a post of mine from another thread, hehehe).
--
Thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org