<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Cannot write Java-backed Webscript without a Template in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/cannot-write-java-backed-webscript-without-a-template/m-p/239138#M192268</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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 &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples#Writing_the_Web_Script_.28Java.29" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples#Writing_the_Web_Script_.28Java.29&lt;/A&gt;&lt;SPAN&gt;, but if I define &amp;lt;format default=""&amp;gt;argument&amp;lt;/format&amp;gt;, and try to call the web script, I get the following Exception:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Web Script format '' is not registered&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;If I define &amp;lt;format default="json"&amp;gt;argument&amp;lt;/format&amp;gt;, I get the following exception:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;java.io.FileNotFoundException - Template sample.get.json.ftl not found.&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I've extended class AbstractWebScript, which according to documentation would mean that no template is needed. How can this be done?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pyppe&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Oct 2009 07:49:18 GMT</pubDate>
    <dc:creator>pyppe</dc:creator>
    <dc:date>2009-10-02T07:49:18Z</dc:date>
    <item>
      <title>Cannot write Java-backed Webscript without a Template</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-write-java-backed-webscript-without-a-template/m-p/239138#M192268</link>
      <description>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 &amp;lt;format default=""&amp;gt;</description>
      <pubDate>Fri, 02 Oct 2009 07:49:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-write-java-backed-webscript-without-a-template/m-p/239138#M192268</guid>
      <dc:creator>pyppe</dc:creator>
      <dc:date>2009-10-02T07:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot write Java-backed Webscript without a Template</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-write-java-backed-webscript-without-a-template/m-p/239139#M192269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What happens if you leave the &amp;lt;format&amp;gt; element out of your descriptor?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Oct 2009 04:40:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-write-java-backed-webscript-without-a-template/m-p/239139#M192269</guid>
      <dc:creator>pmonks</dc:creator>
      <dc:date>2009-10-04T04:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot write Java-backed Webscript without a Template</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-write-java-backed-webscript-without-a-template/m-p/239140#M192270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The problem was in my package structure. The webscript bean I had defined had id that did not match with the Java package of my WebScript class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Consider this issue solved. Thanks, and sorry! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2009 12:40:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-write-java-backed-webscript-without-a-template/m-p/239140#M192270</guid>
      <dc:creator>pyppe</dc:creator>
      <dc:date>2009-10-13T12:40:56Z</dc:date>
    </item>
  </channel>
</rss>

