cancel
Showing results for 
Search instead for 
Did you mean: 

Java Backed Webscripts - AMP - Eclipse

beckel
Champ in-the-making
Champ in-the-making
I have an AMP project setup in Eclipse. It contains a few basic javascript webscripts and I am now writing some Java-backed webscripts. I followed the instructions here : http://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples and I was able to get some stuff running, however, I had to add the beans which declare the webscripts in the web-scripts-application-context.xml file. This is not ideal because I am trying to keep all code and configuration in my Eclipse project. That way, when someone checks it out from SVN, they don't have to go dig around the webapps/alfresco/directory and set up spring bean configurations to get it to work. My question is, how can I let the environment know about my java backed webscripts without physically changing the web-scripts-application-context.xml file? Is there some way I can override it from my Eclipse project by adding some other spring config file?
1 REPLY 1

beckel
Champ in-the-making
Champ in-the-making
I was able to solve this by adding a new file custom-web-scripts-application-context.xml to {Eclipse.proj.root}/config/alfresco/extension . I had to copy everything in the local alfresco/classes/web-scripts-application-context.xml into it. Then I added my beans to declare my java backed webscripts. After running the build script, and restarting the server, it worked.