cancel
Showing results for 
Search instead for 
Did you mean: 

Java backend Share webscript

pankajnegi
Champ in-the-making
Champ in-the-making
Hello friends,

Is there a way to do alfresco share webscript as a java backend similar to alfresco explorer.

I mean can we replace javascript controller to java class.

in wiki and docs I found its only javascript controller.

Please suggest me how to do the same.




Thanks In advance
6 REPLIES 6

jpotts
World-Class Innovator
World-Class Innovator
Web scripts can use either a JavaScript controller or a Java controller. This wiki page walks you through several examples of Java-backed web scripts.

Jeff

pankajnegi
Champ in-the-making
Champ in-the-making
Thanks Jeff.

I have already gone through alfresco explorer webscripts and they are working fine.

But I want the same on the share url like http://127.0.0.1:8080/share/service/mycompany/components/dashlets/hello-world

which should call java class.

I have tried it but couldn't initialize bean which is on the path source/org/company/javaclass.java and  context file on the path config/alfresco/extension/web-scripts-application-context.xml

jpotts
World-Class Innovator
World-Class Innovator
When extending Share, use "web-extension" instead of "extension".

Jeff

pankajnegi
Champ in-the-making
Champ in-the-making
thanks jeff ,its working fine

thinhnk
Champ on-the-rise
Champ on-the-rise
I have a question. Is there anyway to deploy java backend webscript with jar file on share, not amp file.

bone
Champ on-the-rise
Champ on-the-rise
Hello thinhnk,

surely you can deploy java backed webscripts with jar files in Alfresco Share. Take a look for example at <a href="http://ecmstuff.blogspot.de/2011/06/setting-up-build-project-for-alfresco.html">this</a> tutorial blog-post. It describes the build process for Alfresco projects and more precisely the ant targets for building extension jar files.

I hope this may help you further.