Having delved into numerous discussions on resolving absolute and relative paths in http pages, I am still struggling to identify the issue in my unique case... Hence, here I find myself!
My current project is a dynamic web application crafted using Spring MVC/Thymeleaf/Bootstrap. Oddly, when I run the app on my personal computer, the css links remain unresolved. What's perplexing is that they work perfectly fine on another machine.
The location of my Bootstrap file: webapp/css/Bootstrap.css
The corresponding link in the html webapp:
<link href="css/bootstrap.css" rel="stylesheet" type="text/css"/>
On one computer, the link resolves as
http://localhost:8080/css/Bootstrap.css
.
While on the other, it points to http://localhost:8080/myAppContext/css/Bootstrap.css
.
I'm at a loss understanding what could be amiss with my configuration...
This seems like some kind of magic to me... The source code is identical, the tomcat versions match on both machines, and even the Java versions are exactly the same... There are no discrepancies in the servlet.xml configuration for Tomcat. It truly feels like a mystery! :)
Could anyone kindly offer assistance?