We designed an app with Plato theme using Web App Builder 2.0 version, this app is holding couple of outer box widgets(Search, Zoom controls and Home button) and custom widgets in header controller.
We embedded this app in another web application which was built on Java and this was deployed in Web logic Server, So we deployed web app builder app also in the same web logic server. When we are trying to access this app through browser it couldn't able to identify the header control widget resources and it is returning issue "404 Not found" and also please find the attached error screenshot.
If we place our custom widgets folder in the web logic server root location it is working as expected. It is always expecting the resources in the root level with widgets as folder name.
Please let us know if any alternate solution to make it work if we place the widgets folder in a same folder structure which web app builder was generated.
I would start in the main config.json file and add the fill path to the widgets there. Right now they will look like this:
Edit the uri to include the full path.
Hi Robert Scheitlin,
Thank you very much for the quick response.
I tried the solution which you suggested but I am getting different issue when I do this change and still Custom widgets are not working.
I don't know why the modified URi path is trying to get the response with a prepath[http://js.arcgis.com/3.16/dojo/].
Please find the below error and screen shot:
VM364 init.js:152 OPTIONS http://js.arcgis.com/3.16/dojo/w1/wamgis/base/widgets/Asset/manifest.json
XMLHttpRequest cannot load http://js.arcgis.com/3.16/dojo/w1/wamgis/base/widgets/Asset/manifest.json. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://xxxxxxxxx.com:7010' is therefore not allowed access. The response had HTTP status code 403.
VM364 init.js:30 GET http://js.arcgis.com/3.16/dojo/w1/wamgis/base/widgets/Asset/Widget.js
Error: scriptError(…)(anonymous function) @ VM364 init.js:31(anonymous function) @ VM364 init.js:9a @ VM364 init.js:5r.signal @ VM364 init.js:9(anonymous function) @ VM364 init.js:30
VM364 init.js:31 src: dojoLoader
VM364 init.js:31 info: ["//js.arcgis.com/3.16/dojo/w1/wamgis/base/widgets/Asset/Widget.js", Event]
Please suggest me if you have any solution to resolve this.
Once again thanks for the response!
Hi Robert Scheitlin,
I have given the URI for each custom widget like below and please find the below screenshot of config.json file.
ex: "uri": "w1/wamgis/base/widgets/Work/Widget"