cancel
Showing results for 
Search instead for 
Did you mean: 

Incomplete Url from sample/folder Web Script

icarrara
Champ in-the-making
Champ in-the-making
Hi!  I'm using the "sample/folder" Web Script from Alfresco in a portlet that I developed.

The problem is that in the URLs that I get from the sample/folder script  there isn't the host part.

In the Html that I obtain I have this kind of URL:
<a href="/alfresco/service/api/node/content/workspace/SpacesSto
re/68083263-9a9e-11dc-b892-dd9d7b17536a/Studio5Riba.pdf">Studio5Riba.pdf</a>

Why the host part (for example "http://www.somehost.com:8080"  before "/alfresco/service/…") is missing?

Thank you for your support!

Ivano Carrara
2 REPLIES 2

davidc
Star Contributor
Star Contributor
The Web Script url object always renders a url without the host.

If you want a full absolute url you can use the freemarker method 'absurl'.  This will add the host part to the passed url.

e.g. ${absurl(url.service)}

icarrara
Champ in-the-making
Champ in-the-making
Hi David and thank you for your reply!

I was returning here to write that in the meantime I understood the solution viewing the atom version of the folder script….

Thank you again!
Ivano Carrara