cancel
Showing results for 
Search instead for 
Did you mean: 

web scripts example

wps07032
Champ in-the-making
Champ in-the-making
Hello,

I was unable to run the simplest script example, "Hello World", posted on this web link:
http://wiki.alfresco.com/wiki/Web_Scripts_Examples, it would be greatly appreciated if someone can shed some light on what I've done wrong, missing or whatnot?

Under Company Home -> Data Dictionary -> Web scripts -> org -> alfresco -> sample, I've added two contents (files), hello.get.desc.xml and hello.get.html.ftl.  The content of those two files are directly copied from the link above.  According to the documentation, new script or updates to existing script are reflected without requiring a restart of the Tomcat.  So, without restart Tomcat, I enter http://<ip>:<port>/alfresco/service/sample/hello at the browser, but I'm getting "Web Script Status 404 - Not Found".  And when I restarted Tomcat, those two files that I've just added to the system would be gone/disappeared .  Any ideas?

Thanks.
1 REPLY 1

davidc
Star Contributor
Star Contributor
According to the documentation, new script or updates to existing script are reflected without requiring a restart of the Tomcat.

Not quite true.  A refresh is required when adding/updating a Web Script description file.  However, this does not mean restart Tomcat.  To refresh the list of Web Scripts visit the url:

http://<host>:<port>/alfresco/service/

and hit the 'refresh' button.  This page also lists all registered Web Scripts, so you should see Hello World listed.

At some point, I'll update the WIKI page to make this clearer.

And when I restarted Tomcat, those two files that I've just added to the system would be gone/disappeared

Very odd - documents added to the repository do not disappear on restart.