<?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 Re: Issue with webscript response template in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/issue-with-webscript-response-template/m-p/247157#M200287</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You've specified the JavaScript controller as ".post.&lt;/SPAN&gt;&lt;STRONG&gt;json&lt;/STRONG&gt;&lt;SPAN&gt;.js" but this controller will only be used if the request content type is JSON.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i.e you need to add the ""Content-Type: application/json" header to your request.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In general, it's good practice in Freemarker templates to handle potentially missing variables, i.e. &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;${test!""}&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;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jun 2011 09:58:51 GMT</pubDate>
    <dc:creator>mikeh</dc:creator>
    <dc:date>2011-06-20T09:58:51Z</dc:date>
    <item>
      <title>Issue with webscript response template</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/issue-with-webscript-response-template/m-p/247156#M200286</link>
      <description>Hello,I'm trying to write some simple webscripts but when I try to use response templates to return some dataI get a template exception : 05200035 Error during processing of the template Expression "expression" is undefined on line …For example:test.post.json.jsfunction main(){model.test = "Hello!";</description>
      <pubDate>Mon, 20 Jun 2011 09:09:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/issue-with-webscript-response-template/m-p/247156#M200286</guid>
      <dc:creator>abraxas</dc:creator>
      <dc:date>2011-06-20T09:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with webscript response template</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/issue-with-webscript-response-template/m-p/247157#M200287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You've specified the JavaScript controller as ".post.&lt;/SPAN&gt;&lt;STRONG&gt;json&lt;/STRONG&gt;&lt;SPAN&gt;.js" but this controller will only be used if the request content type is JSON.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i.e you need to add the ""Content-Type: application/json" header to your request.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In general, it's good practice in Freemarker templates to handle potentially missing variables, i.e. &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;${test!""}&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;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 09:58:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/issue-with-webscript-response-template/m-p/247157#M200287</guid>
      <dc:creator>mikeh</dc:creator>
      <dc:date>2011-06-20T09:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with webscript response template</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/issue-with-webscript-response-template/m-p/247158#M200288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you Mike,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;setting the header solved it. I somehow totally forgot about that&amp;nbsp; &lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;ops:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 10:30:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/issue-with-webscript-response-template/m-p/247158#M200288</guid>
      <dc:creator>abraxas</dc:creator>
      <dc:date>2011-06-20T10:30:23Z</dc:date>
    </item>
  </channel>
</rss>

