AnsweredAssumed Answered

[Solved] Webscript in a JSR-168 portlets

Question asked by ericc on Aug 28, 2008
Latest reply on Aug 29, 2008 by ericc
Hello,
I try to use the webscript in a portlet using the JSR-168 authenticator.
I'm trying to do it on Liferay 5 (using a Alfresco 2.9b)

I followed the tutorial from Jeff Potts (http://ecmarchitect.com/archives/2008/04/08/823) and I have in Liferay all predifined Alfresco Portlets.
So now I try to add a portlet using my webscript but I have problem.

I defined the portlet and I can add it in Liferay but when I do this I have this error in  the portlet (no error message in tomcat log) :
The requested resource (/alfresco/RepNewsletter/invoke) is not available

Here my configuration files :
portlet.xml
    <portlet>
          <description>RepNewsletter</description>
          <portlet-name>RepNewsletter</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>/sem/ws/newsletters.html?newsletter={idnewsletter}&amp;from={idFrom}&amp;rep={rep?}</value>
          </init-param>
          <supports>
             <mime-type>text/html</mime-type>
             <portlet-mode>VIEW</portlet-mode>
          </supports>
          <portlet-info>
             <title>Rep Newsletter</title>
             <short-title>Rep Newsletter</short-title>
          </portlet-info>
       </portlet>

And the webscript description file :
    <webscript>
      <shortname>Lister les réponses à la newsletter</shortname>
      <description>Lister les réponses à la newsletter</description>
      <url>/sem/ws/newsletters.html?newsletter={idnewsletter}&amp;from={idFrom}&amp;rep={rep?}</url>
      <format default="html">extension</format>
      <authentication>user</authentication>
      <transaction>required</transaction>
    </webscript>

Someone have try this kind of portlet? Any idea for my problem?

Thanks.

Outcomes