cancel
Showing results for 
Search instead for 
Did you mean: 

Creating URLs to Content

akindo
Champ in-the-making
Champ in-the-making
Hi team,

I am unsure which kind of URL to create to content in the AVM.

The Web Scripts samples create URLs like this:

http://{some IP address}/alfresco/service/api/node/content/avm/get/-1;www;avm_webapps;ROOT;Advice;GapYear;genAdvice.gif/genAdvice.gif

whereas the Virtualization Server preview creates URLs like this:

http://get.www--sandbox.{some IP address}.ip.alfrescodemo.net:8180/Advice/GapYear/genAdvice.gif

I'm trying to create a URL in FreeMarker to pull in this image, which type should I create? The first one does create very long, ugly URLs. And will the first type even work when a JSP page, which is not logged into Alfresco, calls the Web Script?

Thanks!  😎
2 REPLIES 2

kevinr
Star Contributor
Star Contributor
It depends what you are trying to do. The first URL - that is the direct path to the object in the AVM store - it requires access to the Alfresco server so will need a login. The virtualisation server path is the path to the object in your web application so may not require a login - it will depend on your webapp.

Thanks,

Kevin

kvc
Champ in-the-making
Champ in-the-making
Any references within your web pages should be root relative … you should not directly use any URL to a virtualized view of a sandbox … those URLs are generated strictly for purposes of preview.  Your URL should be your real URLs in your deployed site … remember, Alfresco is designed to push an approved snapshot to a remote file server or Alfresco server or push, where your web server is configured to point to the root of your deployed app.

Within the authoring context, so long as your paths are root relative, everything should virtualize properly via our constructed URLs so you can test the site prior to deployment.

Kevin