Running Alfresco web scripts as Liferay portlets

I’ve seen a lot of Liferay and Alfresco forum posts from people having trouble getting Alfresco running within a Liferay portal. Once that’s done, people usually want to invoke Alfresco web scripts as portlets without requiring a separate single sign-on (SSO) infrastructure. Some people have pointed to the Alfresco wiki (Deploying 2.1 WAR Liferay 4.3). That is a helpful reference but it isn’t the full story. Here are some notes that may help.

1. Download the Liferay 4.3.6 + Tomcat 5.5 JDK5 bundle. I had mixed results with the latest release 4.4.2. You may be tempted to try to download the WAR-only distribution and configure it in your existing Tomcat instance. In this case, save yourself the time and headache and get the bundle. Fool with the WAR distribution later.

2. Unpack the Liferay distribution and fire it up. Make sure you can log in as the test@liferay.com (password: test) user to validate that all is well with the Liferay install.

2a. Create a test user. (“Create Account” on the Liferay login screen). Remember the email address. This will matter shortly. For this discussion I’ll assume Foo User with a screen name of fuser and an email address of fuser@foo.com. Make sure you create a home directory. In this example, we’ll call it “fuser”.

2b. Verify that you can log in as your test user.

3. Shut down the server.

4. Download Alfresco 2.1.2 Enterprise, WAR only. Alfresco 2.1.1 has a known issue (AWC-1686) with the way authentication is handled for web scripts in the context of Liferay so make sure you are using 2.1.2.

5. Expand the Alfresco 2.1.2 WAR into the Tomcat webapps/alfresco directory (which you’ll have to create the first time). If you are tweaking the install (such as pointing to a specific MySQL database, using something other than MySQL, pointing to a different data directory, etc.) make sure you have copied your good set of extensions into Tomcat’s shared/classes/alfresco/extension directory.

6. Copy the MySQL connector into Tomcat’s common/lib directory.

7. Start Tomcat. When it comes up, you’ll have Liferay running and you’ll have Alfresco running, but Liferay doesn’t yet know about Alfresco. Verify that you can log in to Alfresco as admin.

7a. While you are here, create a test user account. You need to create a user account that has an email address that matches the test user account you created in Liferay. In this example you created Foo User with a screen name of fuser and an email address of fuser@foo.com so you need to create an Alfresco user with the same settings. You’ll log in to Alfresco as fuser. You’ll log in to Liferay as fuser@foo.com.

7b. Verify that you can log in to Alfresco as fuser.

8. Shut down Tomcat.

9. Now you need to configure Alfresco as a Liferay plug-in. This involves adding four files to Alfresco’s WEB-INF directory: liferay-display.xml, liferay-plugin-package.xml, liferay-portlet.xml, and portlet.xml. Why aren’t these available in the Alfresco source or on the wiki? Apparently someone tried to address this at some point because there is a link on the wiki but it is broken. Until that’s addressed, I’ve put them here.

10. Remove the portlet-api-lib.jar file from Alfresco’s WEB-INF/lib directory.

11. Re-package alfresco.war. It is now ready to hand over to Liferay.

12. Start Tomcat.

13. Find your Liferay deploy directory. If you are running out-of-the-box on Linux, Liferay’s “deploy” directory is called liferay/deploy and it resides in the home directory of the user who started Tomcat. I’m running it as root so my Liferay deploy directory is /root/liferay/deploy.

14. Copy the alfresco.war you just created into the deploy directory. Watch the log. You should see Liferay working on the WAR. He’s finding the plug-in config files and essentially deploying the Alfresco portlets.

15. Now log in to Liferay using the Liferay admin account (test@liferay.com). Go to a page, then use the global navigation dropdown to select “Add Content”. The list of portlets should appear and you should see the “Alfresco” category. If you don’t, look at the log because something is amiss. Add the My Spaces portlet to the page. You may see an error at this point but ignore it. The problem is you probably don’t have a user in Alfresco that has an email address of “test@liferay.com”, which is the currently-logged in user.

16. Log out.

17. Log in as your test user that exists in both Alfresco and Liferay (fuser@foo.com).

18. Go to the page. You should see the “My Spaces” portlet. You should be able to upload content, create spaces, etc.

Exposing your own web scripts as portlets

All Alfresco web scripts are automatically exposed as JSR-168 portlets, including the ones you create. To add your web scripts as portlets, first make sure you have authentication set to “user” and transaction set to “required” in your web script’s descriptor. Then, update portlet.xml, liferay-portlet.xml, and liferay-display.xml. Follow the pattern that’s in those files already and you’ll be fine. For example, if you deploy the Hello World web script from my web script tutorial, you need to add a new portlet to portlet.xml with a “scriptUrl” like: /alfresco/168s/someco/helloworld?name=jeff. Then you update liferay-portlet.xml and liferay-display.xml with the new portlet name or portlet ID.

Single sign-on with no single sign-on?

The web script runtime has a JSR-168 authenticator. So when your web scripts get invoked by the portlet, the current credentials are passed in. That’s why your web script can run without requiring an additional sign in. Prior to this being put in place, people had to implement Yale CAS (or an equivalent) to get SSO between Liferay and Alfresco web scripts.

What’s not covered in these instructions is that you’ll probably want to (1) configure both Alfresco and Liferay to authenticate against LDAP and (2) change the configuration of either Alfresco or Liferay to use the same credential (either username or email address) for both systems so that if you do have users logging in to both, they don’t have to remember that one requires the full email address but the other doesn’t.

Troubleshooting

If you see one of the Alfresco portlets displaying “Data is not currently available” or somesuch, try hitting
Alfresco in another tab. Log in, then log out. Then go back to the
portal and open the page again. It should work now. I’m not sure what’s going on there. I think it may have to do with me switching back-and-forth between Liferay instances (4.3.2 versus 4.4.2) so maybe you won’t see it.

Open issues

You may see an error like this:

21:22:15,965 WARN [BaseDeployer:1038] Unable to format /usr/local/bin/liferay-4.3.6/temp/20080408212212978/WEB-INF/faces-config-jbpm.xml: Error on line 5 of document file:///usr/local/bin/liferay-4.3.6/temp/20080408212212978/WEB-INF/faces-config-jbpm.xml : A ‘)’ is required in the declaration of element type “application”. Nested exception: A ‘)’ is required in the declaration of element type “application”.

I haven’t chased that down yet. I’ll update this post with a comment when I find out. I’m sure fixing that will also fix the problem that you’ll see if you try to start an advanced workflow from a piece of content displayed in the My Spaces portlet.

I was also seeing an error when trying to use the “Add Content” link in the straight Alfresco client. I think it is JSF-related. Again, I’ll update this post with a comment when it is resolved (or when I find a Jira ticket).

50 comments

  1. Björn Ryding says:

    Hi Jeff! To solve the open issue, use java.sun.com/dtd/web-facesconfig_1_1.dtd instead of java.sun.com/dtd/web-facesconfig_1_0.dtd

  2. Jon Israelson says:

    Thanks for this post Jeff, it saved me a lot of time.

    One issue that I did find when doing this on a Windows server was that when I deployed the repackaged WAR file, Liferay somehow compared my existing webapps/alfresco folder to the new WAR and determined that nothing had changed. This resulted in the Alfresco portlet not being registered by Liferay (Alfresco would not show up in the “Add Content” portlet list).

    The solution was to simply delete my webapps/alfresco directory between your steps 11 and 12.

  3. Peter says:

    Hi Jeff,

    Thanx for one MORE excellent post/tutorial, really appreciate your work and it has already helped me a lot in getting to know Alfresco and actively work with it! My goal is to create a generic setup of Alfresco in combination with Liferay in which users of multiple (liferay-)communities can be hosted with the added functionality of ECM through Alfresco, transparantly exposed to the user by the use of (community-specific-) portlets. That’s where continuously problems arise, or seem to arise, when trying to accomplish some sort of single-sign-on be it or not through cas. The approach via Webscripts as outlined in your latest article (combined with your donation to the community of OPSOROS 😀 ) looks to me as if it has the most potential to achieve this kind of setup and functionality in a (relatively) easy way, once one gets to understand how it works.

    Thank your for this information!
    Then a question you may have a simple answer to: Should I be able to get this to work with a community-version of Alfresco ie. a nightly build or a 2.9-version?

    Regards,
    Peter

  4. Jim Foster says:

    Hi Jeff,

    You are certainly right about the interest in leveraging the strengths of Liferay as portal with the strengths of Alfresco as ECM.

    You are also right-on-the-money about the uncertainty and confusion out there.

    This article of yours is an excellent read, and should go a long way to alleviate that uncertainty and confusion, but I do have one comment.

    You may want to address this head-on before others hit you with the same question over and over.

    Just where does one get the 2.1.1 version you refer to in your article?

    As of April 11, 2008, there is no such listing at sourceforge (http://sourceforge.net/project/showfiles.php?group_id=143373), nor is there a link on any of the pages at the site.

    I have been building my own Alfresco from svn, and will try your instructions with it as soon as I have the opportunity, but for most folks looking for that 2.1.2 download, you may want to clarify sooner rather than later.

    Jim

  5. Hi Jeff,

    Thank you for this really comprehensive view on how to get Alfresco running in Liferay! We have been working with both products for a while now and in your post I find almost all the points we had to deal with.

    Let me just add an aspect of Liferay 5.0:

    It also works with the new Liferay 5.0.0 and Alfresco portlet 5.0.0.1 (note that you have to modify some files). You can do this after completing the full tutorial so you don´t have to delete your users or content.

    1. Install Liferay 5.0.0 and download the Portlet 5.0.0.1. Extract kit using zip.

    2. As described in the tutorial, copy your customizations into the extensions directory of the extracted portlet and override liferay-display.xml, liferay-plugin-package.xml, liferay-portlet.xml and portlet.xml with the files mentioned in step 9 of the tutorial. This expands your integration possibilities.

    3. Start your tomcat and create your users in alfresco and liferay if not existed before (proceed as described in steps 2 and 7 of the tutorial).

    4. Modify liferay-plugin-package.xml, change Liferay version to 5.0.0 (or 5.0.*).

    5. Repackage the war and copy it to liferay/deploy.

    6. Proceed with Liferays GUI setup as described in step 15.

    7. Enjoy 🙂

    Yours Oliver

  6. Andrew Wilcox says:

    Jeff,
    With your help I was able to configure the alfresco.war successfully with a liferay/tomcat bundle. I am able to see the alfresco portlets in liferay.

    Now I would like to add WCM to alfresco. The install instructions expect you to start with alfresco as the base. I tried to extract the WCM zip into C:\tomcat\bin with no success. I keep getting a NullPointerException.

    Any Ideas?

    Thanks,

    Andrew Wilcox

  7. jpotts says:

    @Peter,

    OPSORO (OPen SOurce ROcks) is an AJAX-based front-end to Alfresco and is not related to ecmarchitect.com or the company I work for, Optaros. I agree it is a cool demonstration of the power of web scripts. More info on Opsoro is at the Alfresco forge here: http://forge.alfresco.com/projects/opsoro/.

    Regarding using Community web scripts with Liferay, it should work but I have not tried it.

    Jeff

  8. jpotts says:

    @Jim Foster,

    2.1.2 is an Enterprise release. It is available from either the secure SVN Enterprise repository or as a binary download from the customer or partner site.

    Jeff

  9. jpotts says:

    @Andrew,

    When you download WCM, what you are downloading is an instance of Apache Tomcat configured to run as the Alfresco virtualization server as well as a spring bean configuration file.

    What I do on my Ubuntu machine, and it should work on Windows as well, is:

    – Unzip the WCM distribution into a directory that makes sense to you.
    – Copy the wcm-bootstrap-context.xml file to
    your Alfresco extension directory like $TOMCAT_HOME/shared/classes/alfresco/extension.
    – Start your Alfresco server.
    – Start your Alfresco virtualization server (the WCM distribution you just downloaded and expanded).

    Hope that helps.

    Jeff

  10. jpotts says:

    A few additional learnings since originally posting this note:

    – There is a known issue with 2.1.2 Enterprise and the out-of-the-box web script portlets. http://issues.alfresco.com/browse/AR-2279

    – The ZIP I had posted did not include the web.xml or faces-config.xml. It now does. Also, I noticed Alfresco’s ZIP is back online.

    – When Liferay deploys the Alfresco WAR it updates the web.xml file. If you are maintaining the web.xml file in SVN, you might want to choose to use the Liferay-updated version of the file.

    – Some people are reporting problems starting advanced workflows within the Alfresco web client portlet. A ticket has been opened at http://issues.alfresco.com/browse/AWC-2059 but I haven’t dug into this one yet.

    – Alfresco 2.2 Enterprise has problems with the web script portlets. Apparently, a 2.2 “EP” release is forthcoming. Maybe the “P” is for portal?

    Jeff

  11. Matthieu Laborie says:

    For your second issue you can use the following filter in web.xml

    Mode Detection Filter
    /faces/*

  12. Matthieu Laborie says:

    Sorry y forgot the classes:

    org.alfresco.web.app.servlet.ModeDetectionFilter

  13. Joseph Sánchez says:

    Hi!
    i want deploy my portlets on Liferay and integrate with alfresco but i can’t install alfresco portlet on Liferay because i have Liferay & WebSphere. Can you help me how to install portlet alfreso on Liferay with WebSphere?
    Thanks!!!

  14. vhakkal says:

    Hello,

    Thanks for writing this article. It has been very helpful. When I add any of the default Alfresco’s Portlets to Liferay I get the following error “Data is not currently available”, I still get this error even if I do what was described in the troubleshooting section. I was wondering if anyone has been able to resolve the issue. I am running Liferay 4.4.2 with Alfresco Enterprise 2.2.0. I did put a breakpoint in the WebScriptPortletRequest to make sure that user name was being passed in from Liferay and it is, also the user does exist in Alfresco. I was also wondering it this would method of integration would pass the username to the default Alfresoco-web-client.

    Thanks

  15. Rahul Bhatia says:

    Thanks for these excellent instructions. I tried to integrate Alfresco Community 2.1.0 WAR with Liferay 4.3.6 and it works! But I’m getting the error you mentioned at the end of your post.

    I get a javax.portlet.PortletException
    caused by java.lang.nullPointerException
    when I try to add content using the Alfresco client in Liferay.

    However, I can add content using the my spaces page. After this error occurs here, I cannot add content even when I go to http://localhost:8080/alfresco because I get a faces error.

    However, if I try to add content in alfresco before accessing liferay and trying to add content in liferay, then it works. I am really confused, because I really cant find any references to this error anywhere on the internet. Can you please help?

    Thanks!

  16. Snig says:

    Do these steps work in Liferay 5.1.1 + Alfresco 3.0a combo?

    I was able to configure the bundle in Liferay 4.3 + Alfresco 2.1 successfully, thanks very much to Jeff.

    However, the same steps do not work properly in the updated versions. The alfresco portlets are properly registered in liferay (as I can see and drag-drop them). But somehow the authentication information is not being shared.

    If I create a web script which does not require authentication and does not access the repository, it works fine. But if the web script requires to access the respository and requires authentication, then it fails. For example, “person”, “userhome” – these does not work!!!

    Any Help…?

  17. Eric Cambray says:

    Thanks for your article, I have my alfresco’s portlet on liferay and all work well.

    But (yes there is a but) when I try to add my webscript to a portlet I have a “The requested resource (/alfresco/helloworld/invoke) is not available” (I try with mine and the Hello World Portlet from your pdf).
    Do I forget something?

    If someone have a piece of respond I take it! Thanks.

  18. Yaso says:

    Hi,

    I followed the steps you have given here for integrating Liferay 4.3.6 and Alfresco 2.9. But When i clicked on “Add Content” there is no Alfresco option and Tomcat didn’t throw any exceptions. It says Alfresco is already up to date and alfresco.war copied successfully.

  19. Yaso says:

    Hi,

    I followed the steps you have given here for integrating Liferay 4.3.6 and Alfresco 2.9. But When i clicked on “Add Content” there is no Alfresco option and Tomcat didn’t throw any exceptions. It says Alfresco is already up to date and alfresco.war copied successfully.

    Could you please tell me what could be wrong?

    Thanks,
    Yaso

  20. kuhajeyan says:

    hi jeff,

    i have was able integrate the liferay5.1 with alfresco 2.1.2 with some success. But when i try to login to the ‘My Spaces’ page i see a spinning graphic appearing and none of the content is visible. have any of this kind of issues reported or am i missing anything. any ideas to resolve this

  21. jpotts says:

    @kuhajeyan,

    I cannot find the JIRA ticket that is related to this but we got a patch from Alfresco to fix this issue.

    Download and install Firebug to see exactly what is being sent/received through the AJAX call. Also turn on debugging (set the webscript log4j logger to debug) to see what’s going on with the server.

    In our case I think we saw that the JSR168 authenticator was losing the session. Alfresco’s patch fixed the problem.

    I’ll try to hunt down the specific JIRA ticket when I get some time, or, if you find it before I do, please post it here.

    Jeff

  22. kuhajeyan says:

    thanks jeff. This seems to be issue in ie7 but it works fine with firefox. i will update my finding on this soon.

  23. mmalczewski says:

    I think there is a small mistake in webscript example (“Exposing your own web scripts as portlets”). You say that scriptUrl should be
    /alfresco/168s/someco/helloworld?name=jeff
    while I found out that it should point exacetely to webscript url (service instead of 168s), which in tutorial is:
    /alfresco/service/helloworld?name=jeff

    This way it works with Liferay 5.1.2 and Alfresco labs 3.0.0 (b 1164) schema 131.

  24. mmalczewski says:

    I have also ran on an issue. I get exception when trying to run Alfresco (http://localhost:8080/alfresco):

    javax.faces.FacesException: java.lang.ClassNotFoundException: com.liferay.util.bridges.jsf.myfaces.MyFacesContextFactoryImpl
    caused by:
    java.lang.ClassNotFoundException: com.liferay.util.bridges.jsf.myfaces.MyFacesContextFactoryImpl

    The funny thing is that after restoring portlet-api-lib.jar file into Alfresco’s WEB-INF/lib directory it runs just fine (although Liferay doesn’t start – there are some ClassCastException issues – java.lang.ClassCastException: org.alfresco.web.scripts.portlet.WebScriptPortlet). I say funny because portlet-api-lib.jar does not contain com.liferay.util.bridges.jsf.myfaces.MyFacesContextFactoryImpl class… Should it be this way?

  25. Arsen Kostenko says:

    Hi Jeff,

    Thanks for all the tutorials and description on Alfresco and it’s customization. They really helped me a lot!

    Currently I’m integrating Alfresco Labs 3b with Liferay v5.1.2 following your tutorial. However it turns out that WebScriptPortlet is not correctly initialized. Could it be due to Spring configuration changes that took place since Alfresco Enterprise 2.1.2 was released?

    A detailed description of an issue might be found here: http://www.liferay.com/web/guest/community/forums/-/message_boards/message/1451412

    Thanks,
    Arsen.

  26. Marco Altieri says:

    Hi Jeff,
    I have to use the integration between alfresco and Liferay described in your post, but I still have problems with portlet authentication.
    Hitting Alfresco in another tab, as you suggests, works, but it’s not useful in a production environment (portal users should not have direct access to alfresco).
    I’m using Alfresco Labs 3b so I cannot ask for the alfresco patch you used.

    Have you some more hints on how to solve this issue?

    Thanks

  27. vardhan says:

    Hi all,
    i am trying to run alfresco 3.0 in Liferay Portal 5.1.2, i created mysql databases same as given in this link: http://liferay.cignex.com/palm_tree/full-liferay-512-alfresco-300-readme.txt

    and i done modification in my
    avm-console.properties if i run tomcat server it is showing error

    1)org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

    2)Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set

    nested exception ans soem other exceptions, Please any one tell me what is the exact problem.

    Reagrds,
    vardhan

  28. Giuseppe Sanny says:

    Hi jpotts, first of all many compliments for your clear and usefull articles.
    I’m sure I’m gonna buy you book!

    I installed liferay 5.1.2 and using “Update Manager” portlet, I installed “Alfresco Client” portlet with any problem.

    Then my question…

    How to use Alfresco and Liferay in the best way?
    1. Just save all documents in Alfresco (instead of jrabbit) and use alfresco repository to build content in liferay
    2. Build directly content in Alfresco..and then how to manage it in liferay?

    An example: I want to show the list of last 5 news.

    Liferay only approach
    1. create a Structure: title, image (get the image from jrabbit), abstract, attached file (get the file from jrabbit) and any other filed you need
    2. Create e Template to view the content
    3. Create content (news) with “Journal Content” using Structure and Template already created
    4. Use “Asset journal” portlet to show your last 5 news

    Liferay+Alfresco approach???
    1. create a Structure: title, image (get the image from Alfresco???), abstract, attached file (get the file from Alfresco???) and any other filed you need
    2. Create e Template to view the content????
    3. Create content (news) with “Journal Content” using Structure and Template already created????
    4. Use “Asset journal” portlet to show your last 5 news????

    Or I can use Alfresco instead of Journal ? And how? using a custo view included in a Liferay portlet?

    Please help me to understand

  29. jpotts says:

    Giuseppe,

    I guess it depends on what you are doing. A lot of people struggle with the decision of whether to use Liferay’s built-in Journal CMS (Jackrabbit) or an alternative like Alfresco.

    You have to think of things like:
    – Is this content portal-specific or does it need to be leveraged elsewhere in the Enterprise, external to the portal
    – How does the content get created (authoring tools, workflow, etc.)
    – What is the nature of my content: HTML chunks and plain-text or lots of documents?
    – How much overall content do I have (hundreds, thousands, tens-of-thousands or more)?

    I’ve seen clients that have used both Journal and Alfresco. They use Journal for content that only makes sense in the context of the portal, and then they use Alfresco for their “Enterprise” repository, and surface that content to the portal through web scripts or Web Services.

    If you are keeping the Journal portlets but using Alfresco instead of Jackrabbit (using Alfresco basically as a straight JSR-170 repository), I believe that is an option, but I don’t have the step-by-step details for setting that up. I would check the Alfresco forums for that.

    Most clients I’ve seen that choose to use both Liferay and Alfresco end up creating their own portlets to work with the Alfresco content.

    Jeff

  30. Giuseppe Sanny says:

    Thank Jeff for your answers very useful!

    I would like to integrate Liferay and Alfresco like you described above

    “I’ve seen clients that have used both Journal and Alfresco. They use Journal for content that only makes sense in the context of the portal, and then they use Alfresco for their “Enterprise” repository, and surface that content to the portal through web scripts or Web Services.”

    So I can choose wich type of content I store in the DB (Liferay) or in the Alfresco repository dependings on my needs.

    So have you (all) any resource (links, articles, forum threads) where I can find how to do it?

    Or can you give me any directionon how to do it?

    Or it’s “just” use Alfresco Web Services in Liferay portlets?

  31. Lalit says:

    Hi,

    I tried integrating Alfresco 3.0 as portlet into Liferay 5.2.3 over JBoss 4.2.3AS using wiki article “http://wiki.alfresco.com/wiki/Deploying_2.1WAR_Liferay4.3” which is same as steps mentioned here by Jeff.
    But not able to get any luck at all.Liferay is working fine.When i am starting “http://localhost:8080/alfresco”,i can see Alfresco web client but not Alfresco as portlet into Liferay.

    I even tried to download portlet from Liferay.com for Alfresco & deployed but no success here also.

    Is these integrations are not valid for Liferay+JBoss Bundle?or Does Alfresco support only Web Client not Portlets.Do i have to go for some vendor to get Alfresco Portlet in Liferay?

    Can anybody help me?I am stuck up here for 15 days.

    Thanks,
    Lalit.

  32. paula says:

    Hi, Jeff:

    I tried this with Alfresco Lab3 and Liferay 5.2.3. Everything is fine until I tried to deploy the alfresco.war to liferay. I got following error message:

    com.liferay.portal.kernel.deploy.auto.AutoDeployException: alfresco.war does not support this version of Liferay

    So the integration way won’t work for liferay 5.2.3? is there anything I could do to fix it? Has anybody tried this with liferay 5.2.3?

    Thanks a lot!

  33. paula says:

    Hi, Lalit:

    I’ve tried this with Alfresco Lab3 and liferay 5.1.2 tomcat 5.5 bundle. It works fine as the instruction except for I can not upload file within the Alfresco portlet which I believe it an existing Alfresco 3 bug.

    Good luck

  34. Luis Teijon says:

    I’ve been reading your posts but I doesn’t work for me. I added the following files

    liferay-display.xml,
    liferay-plugin-package.xml,
    liferay-portlet.xml,
    liferay-display.xml
    web.xml
    and portlet.xml

    and alfresco didn’t work anymore, it showed this error:
    javax.faces.FacesException: java.lang.ClassNotFoundException: com.liferay.util.bridges.jsf.myfaces.MyFacesContextFactoryImpl
    caused by:
    java.lang.ClassNotFoundException: com.liferay.util.bridges.jsf.myfaces.MyFacesContextFactoryImpl

    I don’t know if I followed the steps correctly, I mean I didn’t know how to re-package the WAR so I create a RAR archive and changed its extension, after that I copied it into
    C:\Documents and Settings\USER\liferay\deploy
    directory, is that correct????

  35. Pablo says:

    Hi Jeff

    I got it all working with Liferay 5.3, but the SSO is not working, the web client portlet logs as guest

    I tried to use CAS but I’ve read I need to make a filter

    Can you help me out on this one plz? with or without CAS… anything…

  36. jpotts says:

    Yes, Liferay can integrate with 3.4c. There are a variety of options: Web Services, Web Scripts, CMIS, and third-party toolkits.

    Jeff

  37. Bakytzhan says:

    jpotts, i integrated alfresco 3.4c with liferay 6.0.5. So i made my hello-world webscript as portlet. But when i attemp to access root scoped objects as roothome,company home , some errors occur : “roothome object is not defined.”. What i should do to access following root object.

  38. Bakytzhan says:

    Hello everybody,

    I have a Tomcat server with a Liferay Portal (6.0.5) and Alfresco (v3.4c). I followed some tutorials to have webscripts as portlets, and everything seems to work well with out-of-the-box UI portlet.

    But, I have a problem with my own webscripts, especially when I have:
    – a webscript with a form
    form.get.html.ftl:

    Code: Select all

    Name :
    File :

    – a webscript with the formdata object to catch informations from the previous webscript
    form.post.js:

    Code: Select all
    var filename = null;
    var content = null;
    var title = “”;

    // locate file attributes
    for each (field in formdata.fields)
    {
    if (field.name == “name”)
    {
    title = field.value;
    }
    else if (field.name == “myfile” && field.isFile)
    {
    filename = field.filename;
    content = field.content;
    }
    }
    // treatment….

    My problems:
    – When I press the submit button, I leave the portal. I found a solution with the scripturl() method

    Code: Select all

    – But POST webscripts don’t seem to be supported by the WebScriptPortlet class. A first solution was to bring together the both webscripts.

    Code: Select all

    Code: Select all
    if (args.step == 1)
    {
    //treatment with the formdata object
    }
    else
    {
    //treatment to build the form
    }
    – But now, I have this exception when I submit the form: Exception: org.mozilla.javascript.EcmaError – ReferenceError: “formdata” is not defined (AlfrescoScript#10)

    Is there an issue with POST webscripts in portlet? Is there a solution to my problem?

    Thank you, and excuse me for my english

Comments are closed.