I have bundled an Angular7 app as static content within a spring boot REST API into a .war archive and deployed it on JBoss EAP 7.3. The application deploys successfully and I am able to see the login page. However, when I try to login, I get a
net::err_name_not_resolved error in my browser console and when I check the network tab, I see that the hostname is omitted whilst angular is trying to call the REST API for authentication, hence the error reported in the console. In my angular configs, I have defined
apiHost='/' and expect that this would be resolved to the machine’s host or IP at runtime, but this is not working. I have also created a jboss-web.xml where I defined the context root as
I would greatly appreciate any help in this regard.
I need this to work because I am deploying the .war file in a JBoss cluster, hence, the application should be reachable from any of the cluster members.
I finally resolved the issue by using
I can now call up my application using any of the hosts participating in the JBoss cluster.