<?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: How to deploy ADF generated app to Tomcat(?) in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-deploy-adf-generated-app-to-tomcat/m-p/29653#M12632</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;To &lt;EM&gt;deploy &lt;/EM&gt;an ADF app&amp;nbsp;&lt;EM&gt;to&amp;nbsp;Tomcat&lt;/EM&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Open package.json and change&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;"build": "ng build", &lt;/EM&gt;to&amp;nbsp;&lt;EM&gt;"build": "ng build --base-href /destination-folder/",&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;"build:dist": "ng build --prod",&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;to&amp;nbsp;&lt;EM&gt;"build": "ng build --prod --base-href /destination-folder/",&lt;/EM&gt;(The base href will be the folder that you will create inside webapps)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;Generate the app using: npm run build (or for a distribution build: npm run build:dist)&lt;/LI&gt;&lt;LI&gt;A new folder /dist/ will be created with the content of your compiled app&lt;/LI&gt;&lt;LI&gt;Copy the content of the /dist/ folder to a new folder inside Tomcat webapps with the&amp;nbsp;exact same name as given in --base-href in package.json&lt;BR /&gt;(For example: if you defined the following in package.json: "&lt;EM&gt;ng build --base-href /&lt;STRONG&gt;adf&lt;/STRONG&gt;/" &lt;/EM&gt;your app will have to be copied to: tomcat/webapps/&lt;STRONG&gt;adf&lt;/STRONG&gt;/)&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Open app.config.json and edit the value of ecmHost to the ACS platform server (without the /alfresco/ folder)&lt;BR /&gt;For example:&lt;BR /&gt;&lt;/SPAN&gt;tomcat/webapps/adf/app.config.json &lt;TABLE width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;{&lt;BR /&gt;"$schema": "../node_modules/@alfresco/adf-core/app.config.schema.json",&lt;BR /&gt;"ecmHost": "&lt;STRONG&gt;&lt;A href="https://alfresco.mycompany.com" target="_blank" rel="noopener nofollow noreferrer"&gt;https://alfresco.mycompany.com&lt;/A&gt;&lt;/STRONG&gt;",&lt;BR /&gt;"providers" : "ECM",&lt;BR /&gt;"application": {&lt;BR /&gt;"name": "My adf application"&lt;BR /&gt;},&lt;BR /&gt;"languages": [&lt;BR /&gt;{&lt;BR /&gt;"key": "nl",&lt;BR /&gt;"label": "Dutch"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"logLevel" : "trace"&lt;BR /&gt;}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/LI&gt;&lt;LI&gt;(This step is optional but recommended, it allows deep linking on Tomcat)&lt;BR /&gt;Create the WEB-INF folder inside your new tomcat webapp, create a new file in the new folder:web.xml with following content:&lt;BR /&gt;tomcat/webapps/adf/WEB-INF/web.xml &lt;TABLE width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&amp;lt;web-app xmlns="&lt;A href="http://java.sun.com/xml/ns/javaee" target="_blank" rel="noopener nofollow noreferrer"&gt;http://java.sun.com/xml/ns/javaee&lt;/A&gt;"&lt;BR /&gt;xmlns:xsi="&lt;A href="http://www.w3.org/2001/XMLSchema-instance" target="_blank" rel="noopener nofollow noreferrer"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;"&lt;BR /&gt;xsi:schemaLocation="&lt;A href="http://java.sun.com/xml/ns/javaee" target="_blank" rel="noopener nofollow noreferrer"&gt;http://java.sun.com/xml/ns/javaee&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" target="_blank" rel="noopener nofollow noreferrer"&gt;http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&lt;/A&gt;"&lt;BR /&gt;version="3.0"&lt;BR /&gt;metadata-complete="true"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;display-name&amp;gt;My adf&amp;nbsp;application&amp;lt;/display-name&amp;gt;&lt;BR /&gt;&amp;lt;description&amp;gt;&lt;BR /&gt;&lt;SPAN&gt;My adf&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;application&lt;/SPAN&gt;&lt;BR /&gt;&amp;lt;/description&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;error-page&amp;gt;&lt;BR /&gt;&amp;lt;error-code&amp;gt;404&amp;lt;/error-code&amp;gt;&lt;BR /&gt;&amp;lt;location&amp;gt;/index.html&amp;lt;/location&amp;gt;&lt;BR /&gt;&amp;lt;/error-page&amp;gt;&lt;BR /&gt;&amp;lt;/web-app&amp;gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/LI&gt;&lt;LI&gt;If you have CORS issues,&amp;nbsp;there are 2 options:&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;run&amp;nbsp;ADF &amp;amp;&amp;nbsp;ACS (platform) on the same domain &amp;amp; sub-domain&lt;/LI&gt;&lt;LI&gt;add CORS configuration to ACS (platform) (&lt;EM&gt;not to the ADF Tomcat, it won't work!)&lt;/EM&gt;.&lt;BR /&gt;There are several ways to do it, for example:&lt;UL&gt;&lt;LI&gt;&lt;A target="_blank"&gt;https://community.alfresco.com/community/application-development-framework/blog/2017/06/20/adf-cors-solving-strategies&amp;nbsp;step&amp;nbsp;4&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.alfresco.com/docs/DOC-6615-12-installing-alfresco-ecm-as-adf-service-layer" target="_blank" rel="noopener nofollow noreferrer"&gt;https://community.alfresco.com/docs/DOC-6615-12-installing-alfresco-ecm-as-adf-service-layer&lt;/A&gt;&amp;nbsp;step 2&lt;/LI&gt;&lt;LI&gt;...&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I did it the same way on our&amp;nbsp;environment, ADF is running on the same Tomcat server as my Share environment and it is working perfectly&lt;/P&gt;&lt;P&gt;Best regards &amp;amp; good luck,&lt;/P&gt;&lt;P&gt;DM&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jul 2019 07:04:47 GMT</pubDate>
    <dc:creator>d_moeyersons</dc:creator>
    <dc:date>2019-07-24T07:04:47Z</dc:date>
    <item>
      <title>How to deploy ADF generated app to Tomcat(?)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-deploy-adf-generated-app-to-tomcat/m-p/29650#M12629</link>
      <description>Hello!&amp;nbsp;I am complete newbie if it comes to, not only Alfresco, but web-developing in general. What I want to achive is to use this tutorial: Creating your first ADF app - Alfresco Builder Network - to generate an example ADF app - wich I did. The next thing I would like to do is put this app into To</description>
      <pubDate>Thu, 11 Jul 2019 15:39:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-deploy-adf-generated-app-to-tomcat/m-p/29650#M12629</guid>
      <dc:creator>thatkidmike</dc:creator>
      <dc:date>2019-07-11T15:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to deploy ADF generated app to Tomcat(?)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-deploy-adf-generated-app-to-tomcat/m-p/29651#M12630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when you execute&amp;nbsp;&lt;EM&gt;npm start,&lt;/EM&gt;&amp;nbsp;your app is deployed and run on your local node server. So it should be accessible via the configured host &amp;amp; port across your connected PCs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. the &lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;"proxy.conf.js"&amp;nbsp;&lt;SPAN style="color: #3d3d3d;"&gt;cannot change the host of ACS. You need to it from "app.config.json", change the value of ecmHost&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2019 07:12:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-deploy-adf-generated-app-to-tomcat/m-p/29651#M12630</guid>
      <dc:creator>abbask01</dc:creator>
      <dc:date>2019-07-12T07:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to deploy ADF generated app to Tomcat(?)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-deploy-adf-generated-app-to-tomcat/m-p/29652#M12631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the answer. Nontheless - it wasn't accessible by machines in the local network after "npm start" - I don't know why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Okey, using this: &lt;A href="https://migration33.stage.lithium.com/thread/234647"&gt;How to deploy an ADF application on Tomcat Server?&lt;/A&gt;&amp;nbsp; - with understanding more I managed to deploy the app on the Tomcat server so the other PCs have access to it by my "ip&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ort/appname" - but now the inbuild login component doesn't work. When I try to login in (or any other user from their PCs) it shows:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="27158" class="image-1 jive-image" src="https://connect.hyland.com/legacyfs/online/alfresco/27158_pastedImage_146.png" /&gt;&lt;/P&gt;&lt;P&gt;Not sure what to do about it - I added the filters in tomcat/conf/web.xml file like in here: &lt;A _jive_internal="true" class="link-titled" href="https://community.alfresco.com/community/application-development-framework/blog/2017/06/20/adf-cors-solving-strategies#jive_content_id_4_Enabling_CORS_in_Apache" title="https://community.alfresco.com/community/application-development-framework/blog/2017/06/20/adf-cors-solving-strategies#jive_content_id_4_Enabling_CORS_in_Apache" rel="nofollow noopener noreferrer"&gt;https://community.alfresco.com/community/application-development-framework/blog/2017/06/20/adf-cors-solving-strategies#j…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2019 08:22:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-deploy-adf-generated-app-to-tomcat/m-p/29652#M12631</guid>
      <dc:creator>thatkidmike</dc:creator>
      <dc:date>2019-07-12T08:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to deploy ADF generated app to Tomcat(?)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-deploy-adf-generated-app-to-tomcat/m-p/29653#M12632</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;To &lt;EM&gt;deploy &lt;/EM&gt;an ADF app&amp;nbsp;&lt;EM&gt;to&amp;nbsp;Tomcat&lt;/EM&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Open package.json and change&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;"build": "ng build", &lt;/EM&gt;to&amp;nbsp;&lt;EM&gt;"build": "ng build --base-href /destination-folder/",&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;"build:dist": "ng build --prod",&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;to&amp;nbsp;&lt;EM&gt;"build": "ng build --prod --base-href /destination-folder/",&lt;/EM&gt;(The base href will be the folder that you will create inside webapps)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;Generate the app using: npm run build (or for a distribution build: npm run build:dist)&lt;/LI&gt;&lt;LI&gt;A new folder /dist/ will be created with the content of your compiled app&lt;/LI&gt;&lt;LI&gt;Copy the content of the /dist/ folder to a new folder inside Tomcat webapps with the&amp;nbsp;exact same name as given in --base-href in package.json&lt;BR /&gt;(For example: if you defined the following in package.json: "&lt;EM&gt;ng build --base-href /&lt;STRONG&gt;adf&lt;/STRONG&gt;/" &lt;/EM&gt;your app will have to be copied to: tomcat/webapps/&lt;STRONG&gt;adf&lt;/STRONG&gt;/)&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Open app.config.json and edit the value of ecmHost to the ACS platform server (without the /alfresco/ folder)&lt;BR /&gt;For example:&lt;BR /&gt;&lt;/SPAN&gt;tomcat/webapps/adf/app.config.json &lt;TABLE width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;{&lt;BR /&gt;"$schema": "../node_modules/@alfresco/adf-core/app.config.schema.json",&lt;BR /&gt;"ecmHost": "&lt;STRONG&gt;&lt;A href="https://alfresco.mycompany.com" target="_blank" rel="noopener nofollow noreferrer"&gt;https://alfresco.mycompany.com&lt;/A&gt;&lt;/STRONG&gt;",&lt;BR /&gt;"providers" : "ECM",&lt;BR /&gt;"application": {&lt;BR /&gt;"name": "My adf application"&lt;BR /&gt;},&lt;BR /&gt;"languages": [&lt;BR /&gt;{&lt;BR /&gt;"key": "nl",&lt;BR /&gt;"label": "Dutch"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"logLevel" : "trace"&lt;BR /&gt;}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/LI&gt;&lt;LI&gt;(This step is optional but recommended, it allows deep linking on Tomcat)&lt;BR /&gt;Create the WEB-INF folder inside your new tomcat webapp, create a new file in the new folder:web.xml with following content:&lt;BR /&gt;tomcat/webapps/adf/WEB-INF/web.xml &lt;TABLE width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&amp;lt;web-app xmlns="&lt;A href="http://java.sun.com/xml/ns/javaee" target="_blank" rel="noopener nofollow noreferrer"&gt;http://java.sun.com/xml/ns/javaee&lt;/A&gt;"&lt;BR /&gt;xmlns:xsi="&lt;A href="http://www.w3.org/2001/XMLSchema-instance" target="_blank" rel="noopener nofollow noreferrer"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;"&lt;BR /&gt;xsi:schemaLocation="&lt;A href="http://java.sun.com/xml/ns/javaee" target="_blank" rel="noopener nofollow noreferrer"&gt;http://java.sun.com/xml/ns/javaee&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" target="_blank" rel="noopener nofollow noreferrer"&gt;http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&lt;/A&gt;"&lt;BR /&gt;version="3.0"&lt;BR /&gt;metadata-complete="true"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;display-name&amp;gt;My adf&amp;nbsp;application&amp;lt;/display-name&amp;gt;&lt;BR /&gt;&amp;lt;description&amp;gt;&lt;BR /&gt;&lt;SPAN&gt;My adf&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;application&lt;/SPAN&gt;&lt;BR /&gt;&amp;lt;/description&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;error-page&amp;gt;&lt;BR /&gt;&amp;lt;error-code&amp;gt;404&amp;lt;/error-code&amp;gt;&lt;BR /&gt;&amp;lt;location&amp;gt;/index.html&amp;lt;/location&amp;gt;&lt;BR /&gt;&amp;lt;/error-page&amp;gt;&lt;BR /&gt;&amp;lt;/web-app&amp;gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/LI&gt;&lt;LI&gt;If you have CORS issues,&amp;nbsp;there are 2 options:&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;run&amp;nbsp;ADF &amp;amp;&amp;nbsp;ACS (platform) on the same domain &amp;amp; sub-domain&lt;/LI&gt;&lt;LI&gt;add CORS configuration to ACS (platform) (&lt;EM&gt;not to the ADF Tomcat, it won't work!)&lt;/EM&gt;.&lt;BR /&gt;There are several ways to do it, for example:&lt;UL&gt;&lt;LI&gt;&lt;A target="_blank"&gt;https://community.alfresco.com/community/application-development-framework/blog/2017/06/20/adf-cors-solving-strategies&amp;nbsp;step&amp;nbsp;4&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.alfresco.com/docs/DOC-6615-12-installing-alfresco-ecm-as-adf-service-layer" target="_blank" rel="noopener nofollow noreferrer"&gt;https://community.alfresco.com/docs/DOC-6615-12-installing-alfresco-ecm-as-adf-service-layer&lt;/A&gt;&amp;nbsp;step 2&lt;/LI&gt;&lt;LI&gt;...&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I did it the same way on our&amp;nbsp;environment, ADF is running on the same Tomcat server as my Share environment and it is working perfectly&lt;/P&gt;&lt;P&gt;Best regards &amp;amp; good luck,&lt;/P&gt;&lt;P&gt;DM&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 07:04:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-deploy-adf-generated-app-to-tomcat/m-p/29653#M12632</guid>
      <dc:creator>d_moeyersons</dc:creator>
      <dc:date>2019-07-24T07:04:47Z</dc:date>
    </item>
  </channel>
</rss>

