Problem 1: Angular 2 application deployed on JBOSS server but not able to load static content (js/css). The problem is the website is hosted under its own context (localhost:8080/sample/) and static resources is refered in index.html as (link href="css/index.css" rel="stylesheet") however it doesnt get loaded as network calls are made to localhost:8080/css/index.css.
I need it to point to localhost:8080/sample/css/index.css
Problem 2: Alternately we tried hosting angular application on tomcat but services need to be hosted on jboss, we tried implementing CROS filter (https://amodernstory.com/2014/12/27/using-cors-headers-with-java-example/) but the first request goes through but other request shows pending status in Chrome network's tab.
JBoss EAP includes everything needed to build, run, deploy, and manage enterprise Java applications in a variety of environments, including on-premise, virtual environments, and in private, public, and hybrid clouds. JBoss EAP is based upon the popular open source project WildFly.
Deployment Modes The scanner can operate in one of two different modes, depending on whether it will directly monitor the deployment content in order to decide to deploy (or redeploy) it.
Deployment is the term used for the process of installing a web application (either a 3rd party WAR or your own custom web application) into the JBoss Web server. Web application deployment may be accomplished in a number of ways within the JBoss Web server.
JBoss can be classified as a tool in the "Web Servers" category, while Spring Boot is grouped under "Frameworks (Full Stack)". Spring Boot is an open source tool with 39.8K GitHub stars and 25.8K GitHub forks. Here's a link to Spring Boot's open source repository on GitHub.
I'm having the same problem. To get it to load the static content, you need to set the base href inside index.html to "./". I have found that "." also works. The application should then load properly, BUT you will run into another problem: if you try to visit any of the application routes directly using the address bar, you will see "Not Found". This seems to be related to JBoss's ability to rewrite HTML5 URLs and redirect them to the index. I am trying to solve that problem using the information on this page: https://issues.jboss.org/browse/JDF-512. I will let you know if I succeed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With