I have created multiple Tomcat projects and only after a lot of debugging I have found that Tomcat saves the projects/files I have worked on and makes them available for future use. This is really annoying and it caused me a lot of trouble. For example, I have worked on some project in which I have a file index.html (I used / as Application context, so I can access this index file by simply accessing localhost:8080/index.html after I start Tomcat) and now every time I go to apache-tomcat/bin and run startup.bat and start Tomcat I can go to localhost:8080/index.html and I get that file from the project (EVEN if I then create a new project and I use / as Application context again. I expected that the old project will be deleted and the new project will be put there. This does NOT happen). Also, another issue with this is that every time I make changes in the javascript files the changes are not make in the app. If I open the app in a web browser I get the old version of the app, with the old version of the javascript code. The changes are not reflected in the web app. This is extremely annoying and I lost a lot of time trying to figure out what is going on.
Where are these files stored and more importantly how can I remove them so that Tomcat will be forced to put different things in those places? Can I somehow configure thing such that they will be removed automatically? So that nothing is saved? If not, just how can I remove them myself? I tried to delete cookies, delete the compiled files from my IDE (I use IntelliJ), I searched the files in the apache-tomcat/work folder (and didn't find them), and I also deleted the folders from AppData\Local\JetBrains\IntelliJIdea2021.3\tomcat. Nothing worked. I am using IntelliJ Utimate 2021.3.3 and Apache Tomcat 9.0.62 if it matters.