/* InfoAxon GA Code */
Bootstrap Essentials
September 23, 2015 – 8:50 am | No Comment

Admittedly an august fervor for the publication and launch of my new book – Bootstrap Essentials.
No magnitude of thankfulness would be adequate to the Packtpub team and to my colleagues at InfoAxon.
Here are the links …

Read the full story »
Home » Innovations, Open Source Tutorials, Open Source for Business

Deploying Alfresco Share portlets in Liferay

Submitted bySnig Bhaumik on December 1, 2010 – 10:56 am28 Comments

In Web Scripts as Portlets tutorials, how to deploy Alfresco Web Scripts as Liferay Portlets have been discussed. In this tutorial we will see how to deploy Alfresco Share 3.4 portlets in Liferay.

In the latest community release 3.4b, Alfresco has come up with three new portlets as part of the Share distribution.

  1. Repository Browser
  2. Site Document Library
  3. My Document Library

These are more popularly called as Share DocLib portlets.

Some of the important capabilities of these portlets are -

  • Create Content, Create Folder, Upload
  • Navigate Breadcrumbs, RSS Feed, Hide/Show Folders
  • Simple/Detailed View
  • Filters – All Documents/I’m Editing/Others are Editing/Recently Modified, Recently Added, My Favorites
  • Hierarchical folder browsing
  • Tag browsing
  • Simple Document Details Page
  • Document Details Page including all existing standard Document Actions, Version history, Commenting
  • Edit Document Metadata
  • Simple Folder Details Page (Popup)
  • Folder Details Page – All existing standard folder actions
  • Edit Folder Metadata

In this tutorial, we will explore the steps to deploy these portlets in Liferay.
This is what it would look like.

Repository Browser Portlet in Liferay

Repository Browser Portlet in Liferay

My Documents Library Portlet in Liferay

My Documents Library Portlet in Liferay


  • Liferay 5.2.3
  • Alfresco 3.4b
  • Tomcat 6.0.18
  • MySQL 5
  • Windows 7
  • JDK 6


Assuming you have Tomcat bundle of Liferay up and running (you can download from here), download Alfresco 3.4 packages.


  1. Unzip the downloaded alfresco 3.4 bundle, three folders will be there – bin, licenses and web-server.
  2. Copy the contents of bin folder in \tomcat-6.0.18\bin folder.
  3. Copy the contents of licenses folder in the license folder .
  4. Copy the files of web-server\endorsed folder in \tomcat-6.0.18\endorsed folder. You can create the folder in case it does not exist.
  5. Copy of the files of web-server\lib folder in \tomcat-6.0.18\lib folder.
  6. Copy the contents of web-server\shared folder in \tomcat-6.0.18\shared folder. Create the shared folder if it does not exist.
  7. Create a database in your local MySQL server named alfresco. Create a user named alfresco with same password; and give the user all permissions to the new database.
  8. Open the catalina.properties file from \tomcat-6.0.18\conf folder in your text editor; and put the value of shared.loader as ${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
    The line should look like
  9. Copy the web-server\webapps\alfresco.war file in tomcat’s webapps folder – \tomcat-6.0.18\webapps folder.
  10. Now start your tomcat server (we haven’t deployed share yet) . The server might take a few minutes to start up. Both liferay and alfresco should be deployed. The bootstrap should create tables required for alfresco to run in your MySQL database. Once the server is up and running, you can access Liferay portal as well as Alfresco Web Client application in your browser.
  11. Now copy the web-server\webapps\alfresco.war file in your liferay’s deploy folder. This should ideally be located in parallel to your tomcat-6.0.18 folder.
  12. In the tomcat server log, you will be able to see that the share application is being deployed in the server.
    Notice the following log information properly appeared. This means your share portlets have been recognized and deployed by liferay.
    INFO  [PortletHotDeployListener:227] Registering portlets for share
    INFO  [PortletHotDeployListener:351] 3 portlets for share are available for use
  13. Once the deployment is done, we are just a few steps away. We need to configure the permission model of the alfresco and share application – so that the portlets can properly run in liferay. Stop the tomcat server.
  14. Rename the alfresco-global.properties.sample file as alfresco-global.properties (in folder \tomcat-6.0.18\shared\classes); and open the file. Append the following two lines at the end of the file.

  15. Then open the share-config-custom.xml file from\tomcat-6.0.18\shared\classes\alfresco\web-extension folder, and append the following lines

    <!– Overriding endpoints to reference a remote Alfresco server –>
    <config evaluator=”string-compare” condition=”Remote”>

    <name>Alfresco – unauthenticated access</name>
    <description>Access to Alfresco Repository WebScripts that do not require authentication</description>

    <name>Alfresco Feed</name>
    <description>Alfresco Feed – supports basic HTTP authentication</description>

    <name>Alfresco Connector</name>
    <description>Connects to an Alfresco instance using cookie-based authentication</description> <class>org.springframework.extensions.webscripts.connector.AlfrescoConnector</class>

    <name>Alfresco – user access</name>
    <description>Access to Alfresco Repository WebScripts that require user authentication</description>


  16. Restart your tomcat server, once the server is up, open Liferay portal, log in as Administrator, try to add new portlet. Share PortletsIn the available portlet list, you will be able to see a new group named Alfresco and three portlets available there.
  17. You can add any of the portlets from here and test the functionalities. You have got the full alfresco share document library features in your portal!

About The Author

Snig Bhaumik

Mr. Snigdhendu Bikas Bhaumik is the Technical Director and Heads the Research and Development for InfoAxon. As an Open Source enthusiast, Snig is an active contributor of several open source communities such as - Alfresco ECM (Author of Alfresco Calendar components now included and distributed in Alfresco version 3.0), Liferay Portal and Pentaho Business Intelligence Suite. Snig has just completed a book on Alfresco published by Packtpub - http://www.packtpub.com/alfresco-3-cookbook/book. Snig specializes in Knowledge Management and Business Intelligence domains, and responsible for designing and architecting InfoAxon’s KM and BI solution offerings. He holds an enriching experience of around 12 years in designing, architecting and developing various solutions on open source technologies. Follow him on twitter - @snigbb.


  • Edward says:

    Hi Snig,
    thanks for the detailed info. However, as you may know from the forums the portlets don’t seem to work with LifeRay 6x
    Do you have any workarounds / suggestions on how to make it work?

  • Snig Bhaumik says:

    Hi Ed

    Liferay 6x requires all portlets to developed and deployed as plug-ins. Thus this procedure of deploying Alfresco portlets in liferay 6x fails.

    However, shortly we will be posting the solution for the same. Follow this thread!!!


  • Abouelkheir says:

    Hi Snig,
    I thank you for the smart tutorial,I am just wondering if i can use the same procedure for alfresco 3.3 CE and liferay portal 5.2? I hope itsnt a matter of versions?

    thanks in advance,

  • Snig Bhaumik says:

    Hi Abouelkheir

    Yes, you can use the same process for deploying portlets in 3.3 CE alfresco and 5.2 liferay.

    Alfresco really has not changed the portlet creating and deploying mechanism since 2.9. However, this method will fail in case of liferay 6, where you need to deploy portlets as plug-ins.


  • santana says:


    Have you figured out a way to deploy alfresco in liferay 6?


  • [...] for making you wait, this is the tuto, i hope it will work for you, or else, give your feedbacktutothis too [...]

  • chandra shekher gupta says:

    hi santana,

    Have you figured out the liferay 6 and alfresco integration?
    If not please let me know i will help you…


  • Rajesh Chaurasia says:

    I followed the above stuff on liefray and alfresco.As you mentioned that we need to work on liferays’ tomcat folder by copying the bin of alfresco bundle.I have been able to run alfresco in browsewr but I am unabel to see liferay portal page.

    Let me know what I need to do to see liefrays page as well.

  • Snig Bhaumik says:

    Hi Rajesh

    Supposing your are running your server in localhost with 8080 port, you can see alfresco at http://localhost:8080/alfresco.
    Where as Share will run at http://localhost:8080/share.

    For liferay, you should use only http://localhost:8080/

    Let me know if you are facing any issues.


  • Basanagowda says:

    How can I do this integration using external SSO?

    What configurations I need to make?


  • Snig Bhaumik says:


    Exactly which external SSO are we talking about here.
    Since Liferay and Alfresco both supports CAS integration easily.

  • Robert says:

    If anyone is willing to assist with, or provide information about, integrating Alfresco 3.4 with Liferay 6 I would greatly appreciate it. If possible Alfresco 4.0 as well.


  • adel says:

    hi Snig,
    thank you for the tutorial,
    I am wondering if you have any idea how to deploy Alfresco Share portlets in Liferay jboss bundle instead of tomcat.


  • Snig Bhaumik says:

    Hi Adel

    Is there any specific issues you are facing in deploying the share portlets in liferay?
    Can you please share your steps and any log file produced?


  • abhinav says:

    Thnks for this doc.
    I did this in liferay6.0.6 It works perfectly for me.
    Abhinav Ladani.

  • Snig Bhaumik says:

    Thanks @abhinav.
    Glad to know it was helpful for you.

  • Robin Monteiro says:

    The Webpage http://localhost:8080/share is not opening
    http://localhost:8080 and http://localhost:8080/alfresco is opening properly and is connecting to the mysql database also

  • Snig Bhaumik says:

    @Robin, I think your alfresco and share web applications haven’t properly started up in tomcat.

    Can you share your catalina log?

  • Saikat says:

    Hi Snig & Others,

    Working on Liferay 6.0.6 with JBoss App Server and want to integrate Alfresco for DMS. Would the above steps works for me? Please guide … what are the steps?


  • Snig Bhaumik says:

    Yes Saikat, the above steps should work.
    Do let me know in case you face any issues…

  • David Chao says:

    Dear Mr.Snig Bhaumik:

    Hello,My name is David Chao and I am from Taiwan, I am very
    interesting in the essay of “Integration of Alfresco with Liferay
    Deploy Alfresco Share” in your blog. I did it step by step just like your essay and it works. But when I tried to add any of Alfresco porlet to Lifreray Portal it just cannot be added and it
    show error message “Portlet is temporarily unavailable”. Can you tell what’s wrong? Thanks!

    Best Regard
    David Chao
    Winsonic Electronics Co., Ltd.

  • Snig Bhaumik says:

    Dear David

    Can you forward me your liferay and alfresco log here?


  • Hi..
    Thanks for sharing Alfresco Web Scripts information, using this information, i have solved my problem n also working well,
    Thanks a lot.

  • Snig Bhaumik says:

    Glad it was helpful to you…

  • zurreyab ahmdad says:

    Hi Snig,
    please let me how can integrate alfresco 4.0 EE and liferay 6.1 .and above procedure is not work in liferay6.1

  • Snig Bhaumik says:

    Hi zurreyab
    Can you post the errors you are facing?
    Because the above method should work with the versions you have mentioned here.


  • Meera says:

    HI snig,
    above steps are not working for me to integrate liferay+ alfresco on jboss server since jboss and tomcat both have different configuration methods. Can you provide steps for that.

  • yaswanth says:

    my question is after integrqating with liferay and alfresco, out of the 3 DocLib portlets, two prtlets are working fine. But we are facing problem with site document library, as it asking for preferences in the corrosponding step we clicked on site we wanted to be … but here the problem comes .. after selecting the site its not redirecting to any … it keep showing the same prefernce selction page? Any suggetsion from your side ? that would help us a lot ..
    Thnaks in Advance

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

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

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.