cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Web Scripts with Java

stargazers
Champ in-the-making
Champ in-the-making
Hi.

I am now trying to follow tutorial http://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples
I am little confused about it.

It gives me Java source. Ok, that is good, but I don't understand WHERE I should save that?
And on the other hand, shouldn't I compile it? And should I add it using "create content" from Alfresco Web UI or do I just copy-paste it to text editor and move manually to file system in the correct folder?

Then, the part: "If you now take a look at the web-scripts-application-context.xml file, you’ll see how we register the SimpleWebScript with the Web Script engine.".

So, WHERE this file should be? Should I look it from my /opt/Alfresco and so on, or should it be editable using Alfresco Web UI, or what I have to do?

So shortly: How I should create java source (with text editor or with Alfresco Web UI?) and should I compile it. Also, how I have to search that XML-file, with Web UI or from file browser…

Hope somebody can help me with these beginners steps. Smiley Happy
1 REPLY 1

lista
Star Contributor
Star Contributor
Hi,

like you said, Java code needs to be compiled.
So, you can't simply copy&paste that code somewhere in Alfresco (like you do with normal Web Scripts), and expect results.
The part about declaring is similar too. Generally, this is something completely different in comparison to normal Web Scripts.

I suggest you get Eclipse, Alfresco source, and start from there.
Hopefully, you'll get a few more advices from more experienced people here.

Cheers,
Lista.