I just setup a Tomcat 6 instance in IntelliJ using Maven and an exploded WAR. The WAR deploys, and the Java classes are clearly loading and are debuggable.
For some reason, loading js files is incredibly buggy. I keep getting net::ERR_CONNECTION_RESET errors from Chrome and the outcome is the same on other browsers (the pages incompletely load, with js files not being loaded because of net::ERR_CONNECTION_RESET errors). Even if I do direct links to the files (say localhost:8080/somejavascriptfile.js) and keep hitting refresh, half the time it'll just come up empty, half the time it will load.
I've looked at other solutions and people keep saying I need to do something similiar to this
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
response.setHeader("Pragma", "no-cache"); // HTTP 1.0.
response.setDateHeader("Expires", 0); // Proxies.
But that has had no effect. Any suggestions?
I figured it out. I was recycling an old Tomcat 5 server.xml because I wanted to make sure it would work with my old tomcat config. Turns out it was causing this strange issue.
Apologies.