Problem 1: Angular 2 application deployed on a JBOSS server but unable to load static content (js / css). The problem is that the website is hosted in its own context (localhost: 8080 / sample /) and the static resources refer to index.html as (link href = "css / index.css" rel = "stylesheet"), however, it does not get loaded as network calls are made on localhost: 8080 / css / index.css.
I need it to point to localhost: 8080 / sample / css / index.css
Problem 2: As an alternative, we tried to host the Angular application on tomcat, but the services should be hosted on jboss, we tried to implement the CROS filter ( https://amodernstory.com/2014/12/27/using-cors-headers-with- java-example / ), but the first request passes, but another request shows the pending status on the Chrome network tab.
source share