Create WebScript in Alfresco

In the previous post we have learned about what are webscripts and its role in Alfresco. In this post I will explain how to create a simple webscript in Alfresco. We are going to create Alfresco JavaScript based webscript. Here we are creating webscript which fetch all the document of particular type from repository and return html file with all those properties.


Create WebScript Description file getDocs.get.desc.xml

   <config evaluator="string-compare" condition="WebFramework">


Create Webscript  javascript controller file getDocs.get.js



Create Freemarker Template File getDocs.get.html.ftl



Upload all three files under you alfresco installation under following path

CompanyHome>Data Dictionary> Web Scripts Extensions


Restart the server hit this url


You are good to go to test above webscript you need to hit this url in your browser you will see list of documents of custom content type.

This type of webscripts is very powerful tool to expose alfresco webscript to external application. It is lightweight. It is easy to create and deploy and update. You can deploy your changes on the fly without restarting the server that is the best thing about this type of webscript.

Looking for quality Alfresco Hosting?  Look no further than Arvixe Web Hosting!

Tags: , , , , , | Posted under Alfresco | RSS 2.0

Author Spotlight



I love opensource technologies working with those technologies from the time I have stepped in to the Software Industry. Alfresco CMS is my area of expertise. I have worked on various complex implementations which involved integration of Alfresco with other technologies, extensively worked with JBPM workflows and Webscripts.

Leave a Reply

Your email address will not be published. Required fields are marked *

8 − = 3

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>