cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved] Webscript in a JSR-168 portlets

ericc
Champ in-the-making
Champ in-the-making
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.
2 REPLIES 2

rivetlogic
Champ on-the-rise
Champ on-the-rise

ericc
Champ in-the-making
Champ in-the-making
Thanks RivetLogic, it works.

(and if someone try to do it, put the servlet-mapping after 168s definition)
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.