AnsweredAssumed Answered

Cannot write Java-backed Webscript without a Template

Question asked by pyppe on Oct 2, 2009
Latest reply on Oct 13, 2009 by pyppe
Hi.

I'm trying to write a Java-backed Web Script that would write the response directly – without using a Freemarker Template. I've followed the instructions here http://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples#Writing_the_Web_Script_.28Java.29, but if I define <format default="">argument</format>, and try to call the web script, I get the following Exception:

Web Script format '' is not registered

If I define <format default="json">argument</format>, I get the following exception:

java.io.FileNotFoundException - Template sample.get.json.ftl not found.

I've extended class AbstractWebScript, which according to documentation would mean that no template is needed. How can this be done?

Thanks!

Pyppe

Outcomes