cancel
Showing results for 
Search instead for 
Did you mean: 

Web Script Portlet: Ant target for packaging?

dante256
Champ in-the-making
Champ in-the-making
I've pulled the latest 2.1 out of the community SVN site and have it successfully building and running. I'd like to play with the Web Script portlet:
/root/projects/web-client/source/java/org/alfresco/web/scripts/portlet/

Is there an ant target that will automatically bundle this in a WAR file so I can deploy to a portlet container? If not, any strategies for accomplishing this would be appreciated.
7 REPLIES 7

davidc
Star Contributor
Star Contributor
I haven't written any docs for the web script portlet (that's a task I'll get to soon).  However, the Web Script portlet support allows any Web Script to be hosted in a JSR-168 portal.

We've included portlet configuration for JBoss Portal.  This may not be your portal of choice, but it demonstrates a usage of Web Script portlets.  You can use ant build-jboss or ant incremental-jboss.  Take a look at portlet.xml for the configuration.

If you are deploying to Jboss Portal, there are specific instructions you must follow… http://wiki.alfresco.com/wiki/Build_and_Deploy_WAR_JBossPortal

We're still in the development phase of 2.1, so any comments you have on Web Scripts in or out of portal, we'd appreciate - there's still time for us to react to them prior 2.1 release.

dante256
Champ in-the-making
Champ in-the-making
Thanks David.

I've gotten as far as getting this building and obstensibly deploying into JBoss Portal (although I don't see it in the list of portlets – I'm just getting my feet wet with this portal product). From the log files, it does appear that an Alfresco instance is starting up in the container.

I was looking through the portlet.xml file. Ultimately, we will want to point the portlet at web scripts that will run on an Alfresco instance on another box. Is there syntax to do this (i.e. can I just change the <init-param> to accomplish this)?

garpinc
Champ in-the-making
Champ in-the-making
I run alfresco as a web app not a portlet app so a lightweight standalone jsr-168 portlet would be far better.

In anycase I deployed the war from head as a portlet application to liferay.
Got a lot of javascript errors running alfresco client.

The other portlets all reported an exception:
 java.lang.IllegalArgumentException - All user details are mandatory!  
   
org.alfresco.web.bean.repository.User.(User.java:70) 
org.alfresco.web.scripts.portlet.WebClientPortletAuthenticator.createWebClientUser(WebClientPortletAuthenticator.java:140) 
org.alfresco.web.scripts.portlet.WebClientPortletAuthenticator.authenticate(WebClientPortletAuthenticator.java:114) 
org.alfresco.web.scripts.portlet.WebScriptPortlet$WebScriptPortalRuntime.authenticate(WebScriptPortlet.java:263) 
org.alfresco.web.scripts.WebScriptRuntime.authenticatedExecute(WebScriptRuntime.java:294) 

Any ideas?

ooftish_com
Champ in-the-making
Champ in-the-making
I have received same error after installing Web Scripts Portlets in Liferay.  Liferay is displaying Alfresco Client portlet.
Here is the reason we are getting this error:
Alfresco Web Script portlets require login credentials. Assuming that we need to send credentials for these web script portlets to render in Liferay.
Any Alfresco engineer to help us in resolving this issue?
Or do we need to use SSO(Single Sign On) to login to Liferay and Alfresco?

Any help will  be greatly appreciated?

When will Alfresco 2.1 will be released?

I have read Alfresco 2.1 is concentrating on Web Script Portlets..

davidc
Star Contributor
Star Contributor
The Web Script Portlet runtime assumes the user has already logged into the Portal and that a user with the same name exists in Alfresco.

So, first you need to login to the portal and second, you need to ensure Liferay and Alfresco are sharing the same authentication mechanism.

The error handling obviously needs tidying up here.

garpinc
Champ in-the-making
Champ in-the-making
Is there an out of the box way for alfresco to use liferays authentication/user management mechanism?

davidc
Star Contributor
Star Contributor
Not that I'm aware of.