AnsweredAssumed Answered

Problems deploying SimpleWebScript

Question asked by fmarchioni on Jul 4, 2008
Latest reply on Jun 25, 2015 by wajdi.ghribi
Hi all !
I'd like to test the SimpleWebScript.java example found in the documentation.
I have compiled the class and added it under webapps\alfresco\WEB-INF\classes,
then I have updated module-context.xml with the Bean definition
finally declared the Web Script
<webscript>
  <shortname>The World's Simplest Webscript</shortname>
  <description>Hands back a little bit of JSON</description>
  <url>/demo/simple</url>
  <authentication>none</authentication>
  <format default="">argument</format>
</webscript>

Now when I try to invoke the script

http://localhost:8080/alfresco/service/demo/simple

I get the following error:

Message: Web Script format 'null' is not registered 
  
Exception: org.alfresco.web.scripts.WebScriptException - Web Script format 'null' is not registered 


I have tried changing the format to "html", then I get a different error…seems it's missing the response document…

Message: IO Error during processing of the template 'org/alfresco/sample/simple.get.html.ftl'. Please contact your system administrator. 
  
Exception: java.io.FileNotFoundException - Template org/alfresco/sample/simple.get.html.ftl not found. 


Can anybody help me to fix it ?
thanks a lot
Francesco

Outcomes