To expose Alfresco Webscripts as portlets you must declare each Webscript as a portlet in
the Alfresco portlet.xml.
You must add in Alfresco a portlet.xml file in alfresco.war/WEB-INF/.
Here the snippet to expose your Alfresco WebScript as a portlet.
You need to use WebScriptPorlet class to do this integration.
You can see how you can use Alfresco authentication, if your webscript need to
authenticate users. In this way the user session is taken from portal session.
Hope this helps.
portlet.xml:
| <portlet>
| <description>Your Alfresco Webscript</description>
| <portlet-name>Your Alfresco Webscript</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/yourWebscriptUrl</value>
| </init-param>
| <expiration-cache>0</expiration-cache>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| </supports>
| <portlet-info>
| <title>Your Alfresco Webscript Portlet</title>
| <short-title>Your Alfresco Webscript
Portlet</short-title>
| </portlet-info>
| </portlet>
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211936#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...