Tomcat in Eclipse is ignoring source HTML changes and not publishing them, even though it worked fine before.
I have Windows 10 Pro 64-bit, with Tomcat 8.5.6 installed in C:\bin\tomcat
. I am running Eclipse Java EE 4.7.0, installed in D:\bin\eclipse
(a separate volume). Tomcat has been added as an 8.5 server. My workspace is in D:\workspace
. I have a Maven web application in D:\workspace\project
, with HTML file index.html
in src/main/webapp
. My project has the "Dynamic Web Module 3.1" facet enabled. I have added a "Tomcat v8.5 Server at localhost" in the "Servers" tab, and I have added my project to the server. I have turned off caching in my browser.
With the above configuration, on the machine laptop1
I would start the server and I could access my index.html
in a browser via localhost
. If I edited index.html
, as soon as I saved it Tomcat would quickly show that the files needed publishing, and then would auto-publish the changed file. I could refresh the browser and see the changed HTML file immediately. I worked in this development environment for six to nine months.
I configured a virtually identical machine laptop2
by installing the same version of Tomcat in C:\bin\tomcat
as before. I connected the volume D:
to laptop2
. I built the project and started Tomcat. I was able to open the browser and see index.html
via localhost
.
But now if I edit index.html
, even inside Eclipse, the changes do not show up in the browser.
- I have used F5 to refresh the project tree.
- I have verified that
src/main/webapp/index.html
has new content and has its timestamp updated. - The content and timestamp of the files in
target/m2e-wtp/web-resources
do not change after editingindex.html
, even if I restart the server. - I have removed and re-added the web app from the server in Eclipse, with no change in behavior.
- I have removed and re-added the "Tomcat v8.5 Server" from the "Server" tab, with no change in behavior.
- I have removed and re-added the "Apache Tomcat v8.5" runtime environment from Eclipse, with no change in behavior.
- I have completely disabled Windows Defender using the group policy editor for both
laptop1
andlaptop2
.
I am at a loss to think of what else I could check. I do not know if moving from one system to the other had anything to do with Tomcat stopping recognizing and publishing file changes.