<base href="https://stackoverflow.com/">
is the issue , change it to your context root . Or change it to
<base href="https://stackoverflow.com/questions/59925804/.">
Browser is unable to find your JS file because it looks for JS file relative to base href.
Your base href= “https://stackoverflow.com/” , so it looks for all js file in the in “localhost:8080/”,
but your JS files might have present in “localhost:8080/someRoot”
One more solution you can think of is, deploying in the ROOT folder of tomcat with out context root , if that is allowed for your project