07-11-2019 08:39 AM
Hello!
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 Tomcat (wich I beleive is installed since I successfuly managed to use it with "/share" on another computer in the same network) - so all the PCs in the network would be able to access my application just via, i.e. "hostname/appname" - put in the browser. Unfortunately I couldn't get it working well - also couldn't find any solution for this, seems to be, simple problem.
The things I did so far is installing the Alfresco Community Edition and all things used in the above tutorial to generate an app. Moreover I started the Alfresco Community along with Tomcat and Postgres so the "localhost/share" - is working well and since the example app uses a "login component" - wich directs to the Alfresco Content Services (if I am not wrong) - if another computer put my localhost adress in the "proxy.conf.js" file and start their own application, the login component actualy uses ACS from my own computer (user made in the localhost/share is recognized in the login component in the generated app)*. I also put the whole project folder into the webapps in the Tomcat folder but I was just a wild guess - didn't work.
* - all the PCs are in the same network for testing purposes
So simply - how to put that generated app into the Tomcat so another PC in the same network could access it as a client and later on (if I'll be able to add the functionalities) - put some file onto the server and it will be stored on my computer but also it will be visible for all the users who will access the app via browser by, i. e. "localhost/appname".
07-24-2019 12:04 AM
Hi,
To deploy an ADF app to Tomcat:
{ "$schema": "../node_modules/@alfresco/adf-core/app.config.schema.json", "ecmHost": "https://alfresco.mycompany.com", "providers" : "ECM", "application": { "name": "My adf application" }, "languages": [ { "key": "nl", "label": "Dutch" } ], "logLevel" : "trace" } |
<web-app xmlns="http://java.sun.com/xml/ns/javaee" <display-name>My adf application</display-name> |
I did it the same way on our environment, ADF is running on the same Tomcat server as my Share environment and it is working perfectly
Best regards & good luck,
DM
07-12-2019 12:12 AM
when you execute npm start, your app is deployed and run on your local node server. So it should be accessible via the configured host & port across your connected PCs.
P.S. the "proxy.conf.js" cannot change the host of ACS. You need to it from "app.config.json", change the value of ecmHost
07-12-2019 01:22 AM
Thanks for the answer. Nontheless - it wasn't accessible by machines in the local network after "npm start" - I don't know why.
Okey, using this: How to deploy an ADF application on Tomcat Server? - with understanding more I managed to deploy the app on the Tomcat server so the other PCs have access to it by my "iport/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:
Not sure what to do about it - I added the filters in tomcat/conf/web.xml file like in here: https://community.alfresco.com/community/application-development-framework/blog/2017/06/20/adf-cors-...
07-24-2019 12:04 AM
Hi,
To deploy an ADF app to Tomcat:
{ "$schema": "../node_modules/@alfresco/adf-core/app.config.schema.json", "ecmHost": "https://alfresco.mycompany.com", "providers" : "ECM", "application": { "name": "My adf application" }, "languages": [ { "key": "nl", "label": "Dutch" } ], "logLevel" : "trace" } |
<web-app xmlns="http://java.sun.com/xml/ns/javaee" <display-name>My adf application</display-name> |
I did it the same way on our environment, ADF is running on the same Tomcat server as my Share environment and it is working perfectly
Best regards & good luck,
DM
Explore our Alfresco products with the links below. Use labels to filter content by product module.