java Backed web script help
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2008 09:50 PM
Hi everyone…. I was just trying to run a sample java backed web script…. When I copy pasted the SimpleWebScript Example from alfresco wiki to eclipse where My SDk is set up… It Fails to find the class org.alfresco.web.scripts.AbstractWebScript… as a result shows an error message in import org.alfresco.web.scripts.AbstractWebScript line… Is there any other jar files i need to add… I have already added all the jars in alfresco embedded and alfresco remote.. and all the other examples ran fine.. I just failed to create the class file of the simplewebscrpt…. Can any body tell me what to do… I need to figure this out quickly… Any help pleaseee….
Thanking Everyone Faisal
Thanking Everyone Faisal
Labels:
- Labels:
-
Archive
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2008 04:50 AM
In Alfresco versions prior to 3.0, this class lives in the alfresco-web-client.jar.
In Alfresco 3.0 onwards, you'll find it in alfresco-webscript-framework.jar.
In Alfresco 3.0 onwards, you'll find it in alfresco-webscript-framework.jar.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2009 03:57 PM
Hi thanx a lot for u r reply the other day. Now i ran into another problem. I was trying to add users into alfresco using web scripts. To do that I need to get hold of the peopleService bean. As a result I was trying to get hold of the webApplicationContext of alfresco from the webscripts.
To do that I was trying to use
WebApplicationContext configurationApplicationContext= WebApplicationContextUtils.getWebApplicationContext(this.getWebScriptRegistry().getContext());
But it was not telling me getWebScriptRegistry() does not exist even though it is there in the api at
http://dev.alfresco.com/resource/docs/java/web-client/org/alfresco/web/scripts/AbstractWebScript.htm...
Can you anyone plz tell me how to get around it. Is this funtion no longer there in version 3.0 ? If it is not then how do I get hold of the webapplicationContext from a web script.
Thanking You
Faisal
To do that I was trying to use
WebApplicationContext configurationApplicationContext= WebApplicationContextUtils.getWebApplicationContext(this.getWebScriptRegistry().getContext());
But it was not telling me getWebScriptRegistry() does not exist even though it is there in the api at
http://dev.alfresco.com/resource/docs/java/web-client/org/alfresco/web/scripts/AbstractWebScript.htm...
Can you anyone plz tell me how to get around it. Is this funtion no longer there in version 3.0 ? If it is not then how do I get hold of the webapplicationContext from a web script.
Thanking You
Faisal
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2009 06:43 PM
The usual way of obtaining services in Java Backed scripts is to inject references via Spring.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2009 03:23 PM
Thanx a lot… I got my webscripts working using your r suggestions
