<?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: 404 related files for webscripts. in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/404-related-files-for-webscripts/m-p/105112#M73480</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You may set any http status code on a web script response.&amp;nbsp; By default, it'll be 200 (OK), or 500 (error).&amp;nbsp; To set the status, the following javascript is issued:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;status.code = xxx;&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;You may also customise the response content based on the error code.&amp;nbsp; This is achieved by providing a template for the status code and adding this to your javascript:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;status.redirect = true;&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;The status code template follows a naming convention where the error code is part of the name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you don't set status.redirect = true, then the standard template associated with the web script is rendered, however, the status code on the response header is still set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For more info see &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Web_Scripts#Response_Status" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Web_Scripts#Response_Status&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Aug 2007 09:59:01 GMT</pubDate>
    <dc:creator>davidc</dc:creator>
    <dc:date>2007-08-22T09:59:01Z</dc:date>
    <item>
      <title>404 related files for webscripts.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/404-related-files-for-webscripts/m-p/105111#M73479</link>
      <description>Hi,I am a newbie, i looked at a couple of examples for creating webscripts and i could see that… in the .js file we declare this:if (folder == undefined || !folder.isContainer){&amp;nbsp;&amp;nbsp; status.code = 404;&amp;nbsp;&amp;nbsp; status.message = "Folder " + url.extension + " not found.";&amp;nbsp;&amp;nbsp; status.redirect = true; } model.folde</description>
      <pubDate>Tue, 21 Aug 2007 16:53:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/404-related-files-for-webscripts/m-p/105111#M73479</guid>
      <dc:creator>explorer</dc:creator>
      <dc:date>2007-08-21T16:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: 404 related files for webscripts.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/404-related-files-for-webscripts/m-p/105112#M73480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You may set any http status code on a web script response.&amp;nbsp; By default, it'll be 200 (OK), or 500 (error).&amp;nbsp; To set the status, the following javascript is issued:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;status.code = xxx;&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;You may also customise the response content based on the error code.&amp;nbsp; This is achieved by providing a template for the status code and adding this to your javascript:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;status.redirect = true;&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;The status code template follows a naming convention where the error code is part of the name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you don't set status.redirect = true, then the standard template associated with the web script is rendered, however, the status code on the response header is still set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For more info see &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Web_Scripts#Response_Status" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Web_Scripts#Response_Status&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 09:59:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/404-related-files-for-webscripts/m-p/105112#M73480</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2007-08-22T09:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: 404 related files for webscripts.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/404-related-files-for-webscripts/m-p/105113#M73481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for the reply.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 15:20:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/404-related-files-for-webscripts/m-p/105113#M73481</guid>
      <dc:creator>explorer</dc:creator>
      <dc:date>2007-08-22T15:20:04Z</dc:date>
    </item>
  </channel>
</rss>

