The best thing is to have a setting (e.g. a Symbol) with the server url in
it. Because with some configurations (e.g. with a load balancer in front)
you cannot get the real server url via the HttpRequest. 

So your code would look something like this:

@Inject
@Path("context:/img/logo.gif")
private Asset logo;

@Value("server.url")
private String serverUrl

public String getLogoUrl()
{
    return serverUrl + logo.toClientURL();
}

Cheers,
another Chris

PS: you can also add your own binding prefix "absolute:" but that needs some
more work.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/absolute-asset-url-tp5588296p5599216.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to