<?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 createSite tutorial build issues in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/createsite-tutorial-build-issues/m-p/286456#M239586</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have posted on the site, but the tutorial is &lt;/SPAN&gt;&lt;A href="http://ecmstuff.blogspot.co.uk/2012/03/creating-alfresco-share-sites-with.html?showComment=1405435477735#c7387631640776825538" rel="nofollow noopener noreferrer"&gt;http://ecmstuff.blogspot.co.uk/2012/03/creating-alfresco-share-sites-with.html?showComment=1405435477735#c7387631640776825538&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It contains source code to programmaticaly create a working site. Now, having identified the key steps in creating a usable site programmatically I would like to use the code. However, I have no idea how to build it and then install it. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to just write the post javascript webscript; however writing a post powered webscript keeps yielding the page where I'm told that I either don't have permission, or the page does not exist etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would love to know the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I build the script?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What authentication should I be using for the posts?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I find up-to-date docs on the REST api for the services to add people and their roles to sites?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Jul 2014 17:01:25 GMT</pubDate>
    <dc:creator>jocylincouch</dc:creator>
    <dc:date>2014-07-15T17:01:25Z</dc:date>
    <item>
      <title>createSite tutorial build issues</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/createsite-tutorial-build-issues/m-p/286456#M239586</link>
      <description>I have posted on the site, but the tutorial is http://ecmstuff.blogspot.co.uk/2012/03/creating-alfresco-share-sites-with.html?showComment=1405435477735#c7387631640776825538 It contains source code to programmaticaly create a working site. Now, having identified the key steps in creating a usable sit</description>
      <pubDate>Tue, 15 Jul 2014 17:01:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/createsite-tutorial-build-issues/m-p/286456#M239586</guid>
      <dc:creator>jocylincouch</dc:creator>
      <dc:date>2014-07-15T17:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: createSite tutorial build issues</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/createsite-tutorial-build-issues/m-p/286457#M239587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm confused about what you are asking. From the blog post it looks like you've already created a working web script. Are you now trying to refactor it somehow? If so, can you be more specific?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regarding the up-to-date docs on the Public API, see &lt;/SPAN&gt;&lt;A href="http://docs.alfresco.com/4.2/pra/1/concepts/pra-resources.html" rel="nofollow noopener noreferrer"&gt;http://docs.alfresco.com/4.2/pra/1/concepts/pra-resources.html&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2014 17:19:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/createsite-tutorial-build-issues/m-p/286457#M239587</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2014-07-15T17:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: createSite tutorial build issues</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/createsite-tutorial-build-issues/m-p/286458#M239588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Apologies: The issue is that I've no idea how to build it, and I want that particular one as I don't see how to add users and their roles to sites without using a webscript. It's a really simple issue; I have the directory containing the source code for the create site which contains createSites.post.desc.xml&amp;nbsp; createSites.post.html.ftl&amp;nbsp; createSites.post.js&amp;nbsp; CreateSitesWebScript.java&amp;nbsp; login.txt&amp;nbsp; services-context.xml as expected. However I can't work out how I should go about installing these files into my alfresco server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where I've put webscripts before (in /opt/alfresco-4.2.f/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/modules) contains no java, and I also dont' see how the java is linked in to the webscript system.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you elucidate on this please?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 08:33:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/createsite-tutorial-build-issues/m-p/286458#M239588</guid>
      <dc:creator>jocylincouch</dc:creator>
      <dc:date>2014-07-16T08:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: createSite tutorial build issues</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/createsite-tutorial-build-issues/m-p/286459#M239589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Descriptors, templates, and controllers go in $TOMCAT_HOME/share/WEB-INF/classes/alfresco/web-extension/site-webscripts in your own package folder structure. Java classes go in a JAR file which is then placed in $TOMCAT_HOME/share/WEB-INF/lib. The compiled Java class does not have to be in the same package structure as your web script files.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The way you tell Alfresco to use your Java controller for your web script is through Spring configuration. Here is an example spring bean configuration taken from my &amp;lt;a href="&lt;/SPAN&gt;&lt;A href="http://ecmarchitect.com/alfresco-developer-series-tutorials/webscripts/tutorial/tutorial.html#posting-a-rating-with-a-java-backed-web-script" rel="nofollow noopener noreferrer"&gt;http://ecmarchitect.com/alfresco-developer-series-tutorials/webscripts/tutorial/tutorial.html#posting-a-rating-with-a-java-backed-web-script&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;webscripts tutorial&amp;lt;/a&amp;gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;bean id="webscript.com.someco.ratings.rating.post" class="com.someco.scripts.PostRating" parent="webscript"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="ratingBean"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ref bean="ratingBean" /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="nodeService"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ref bean="NodeService" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;/bean&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can see that this particular web script has two dependencies being injected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The critical part is that the bean id, "webscript.com.someco.ratings.rating.post" matters. The first part, "webscript" tells Alfresco this bean is going to be pointing to a web script controller. The last part, "com.someco.ratings.rating.post" is the package folder structure where my web script descriptor (and any other web script files, like templates, etc.) resides, relative to the site-webscripts folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Packaging all of those files and putting them in your exploded WAR manually works, but it is a bad practice. Instead, you ought to use the Alfresco Maven SDK to build an AMP, then install the AMP into your WAR. The tutorial I referenced earlier includes &amp;lt;a href="&lt;/SPAN&gt;&lt;A href="https://github.com/jpotts/alfresco-developer-series/tree/master/webscripts" rel="nofollow noopener noreferrer"&gt;https://github.com/jpotts/alfresco-developer-series/tree/master/webscripts&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;source code&amp;lt;/a&amp;gt; that takes that approach if you want to see how that works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2014 16:01:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/createsite-tutorial-build-issues/m-p/286459#M239589</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2014-07-18T16:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: createSite tutorial build issues</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/createsite-tutorial-build-issues/m-p/286460#M239590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Much appreciated. Thankyou so much for your reply. I'll be giving that a go today &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 08:58:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/createsite-tutorial-build-issues/m-p/286460#M239590</guid>
      <dc:creator>jocylincouch</dc:creator>
      <dc:date>2014-07-21T08:58:08Z</dc:date>
    </item>
  </channel>
</rss>

