AnsweredAssumed Answered

WebScripts as Portlets

Question asked by bgdavis28 on Jan 11, 2010
Hello,

   I am trying to determine the best approach to view, download, upload, delete etc., documents in Alfresco via a JSR 168 Portlet deployed in Jetspeed 2.2.0.  I have searched all over google and I can't find concrete information.  I currently have the newest Community Edition of Alfresco, 3.2r. I have read that web scripts can be used as Portlets.  I have read that Alfresco comes with out of the box webscripts/portlets like My Documents, My Tasks… etc.,  What is the best approach to get these Portlets running in Jetspeed 2.2.0?  Or do I need to write a portlet?  I tried removing the portlet-lib.jar from the WEB-INF/lib folder, rolling the war back up and placing it in the jetspeed/WEB-INF/deploy/local directory but this was not successful.  I get an error:

Failed to load portlet.org.alfresco.web.scripts.portlet.WebScriptPortlet: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'webscripts.container' is defined.

here is my portlet.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
    <portlet>
        <description>Alfresco Client Portlet</description>
        <portlet-name>AlfrescoClient</portlet-name>
        <portlet-class>org.alfresco.web.app.portlet.AlfrescoFacesPortlet</portlet-class>
       
        <init-param>
           <name>default-view</name>
           <value>/jsp/login.jsp</value>
        </init-param>

        <supports>
            <mime-type>text/html</mime-type>
            <portlet-mode>VIEW</portlet-mode>
            <portlet-mode>HELP</portlet-mode>
        </supports>

        <portlet-info>
            <title>Alfresco Client Portlet</title>
            <short-title>alfresco-client-portlet</short-title>
        </portlet-info>
    </portlet>

    <portlet>
        <description>My Tasks</description>
        <portlet-name>AlfrescoMyTasks</portlet-name>
        <portlet-class>org.alfresco.web.scripts.portlet.WebScriptPortlet</portlet-class>
       
        <init-param>
           <name>authenticator</name>
           <value>webscripts.authenticator.jsr168.wAbclient</value>
        </init-param>
        <init-param>
           <name>scriptUrl</name>
           <value>/alfresco/168s/ui/mytasks</value>
        </init-param>

        <supports>
            <mime-type>text/html</mime-type>
            <portlet-mode>VIEW</portlet-mode>
        </supports>

        <portlet-info>
            <title>My Tasks</title>
            <short-title>My Tasks</short-title>
        </portlet-info>
    </portlet>

    <portlet>
        <description>Document List</description>
        <portlet-name>AlfrescoDocList</portlet-name>
        <portlet-class>org.alfresco.web.scripts.portlet.WebScriptPortlet</portlet-class>
       
        <init-param>
           <name>authenticator</name>
           <value>webscripts.authenticator.jsr168.webclient</value>
        </init-param>
        <init-param>
           <name>scriptUrl</name>
           <value>/alfresco/168s/ui/doclist</value>
        </init-param>

        <supports>
            <mime-type>text/html</mime-type>
            <portlet-mode>VIEW</portlet-mode>
        </supports>
       
        <portlet-info>
            <title>Document List</title>
            <short-title>Document List</short-title>
        </portlet-info>
    </portlet>
   
    <portlet>
        <description>My Spaces</description>
        <portlet-name>AlfrescoMySpaces</portlet-name>
        <portlet-class>org.alfresco.web.scripts.portlet.WebScriptPortlet</portlet-class>
       
        <init-param>
           <name>authenticator</name>
           <value>webscripts.authenticator.jsr168.webclient</value>
        </init-param>
        <init-param>
           <name>scriptUrl</name>
           <value>/alfresco/168s/ui/myspaces</value>
        </init-param>

        <supports>
            <mime-type>text/html</mime-type>
            <portlet-mode>VIEW</portlet-mode>
        </supports>
       
        <portlet-info>
            <title>My Spaces</title>
            <short-title>My Spaces</short-title>
        </portlet-info>
    </portlet>

    <portlet>
        <description>My Web Forms</description>
        <portlet-name>AlfrescoMyWebForms</portlet-name>
        <portlet-class>org.alfresco.repo.web.scripts.portlet.WebScriptPortlet</portlet-class>
       
        <init-param>
           <name>authenticator</name>
           <value>webscripts.authenticator.jsr168.webclient</value>
        </init-param>
        <init-param>
           <name>scriptUrl</name>
           <value>/alfresco/168s/ui/mywebforms</value>
        </init-param>

        <supports>
            <mime-type>text/html</mime-type>
            <portlet-mode>VIEW</portlet-mode>
        </supports>
       
        <portlet-info>
            <title>My Web Forms</title>
            <short-title>My Web Forms</short-title>
        </portlet-info>
    </portlet>
   
    <portlet>
        <description>My Web Files</description>
        <portlet-name>AlfrescoMyWebFiles</portlet-name>
        <portlet-class>org.alfresco.web.scripts.portlet.WebScriptPortlet</portlet-class>
       
        <init-param>
           <name>authenticator</name>
           <value>webscripts.authenticator.jsr168.webclient</value>
        </init-param>
        <init-param>
           <name>scriptUrl</name>
           <value>/alfresco/168s/ui/mywebfiles</value>
        </init-param>

        <supports>
            <mime-type>text/html</mime-type>
            <portlet-mode>VIEW</portlet-mode>
        </supports>
       
        <portlet-info>
            <title>My Web Files</title>
            <short-title>My Web Files</short-title>
        </portlet-info>
    </portlet>
   
    <user-attribute>
        <name>user.home-info.online.email</name>
    </user-attribute>

</portlet-app>




Thank you in advance for any assistance
B

Outcomes