Tomcat – Web app running on tomcat not updating when modified

tomcattomcat8web-applications

I'm modifiying a web app coded by another guy with AngularJS. This app is fed by csv data files and is running fine in the first place. However, when I'm trying to change some data in the csv files, every part of the app that relies on data taken from those .csv gets broken.

I first suspected this problem to be related to the fact Excel was recognizing the .csv files as SYLK files when I tried to modify them. However, when I tried to replace the new .csv by the old ones, it didn't change anything. Even more, removing the whole app overall and putting the old one in place instead didn't change anything to the problem.

So now, I'm suspecting there is some cache problem with the Tomcat server (8.0 under windows) I'm running the app on. I tried deleting the localhost folder in work/Catalina from the Tomcat installation folder as suggested in another question on Serverfault, but it doesn't change anything either (neither Under IE, nor Chrome). The only way I can go back to a working app is reboot my computer, but obviously I don't want to reboot each time I'm doing a modification.

Any idea to what could be causing the problem?

Best Answer

I actually found the answer, it was actually two problems combined:

  • the browsers, which didn't override their cache. Solution: delete the cache of Firefox/Chrome each time the app is updated. IE was actually checking by itself for new versions of the page so it didn't have this problem.

  • An unix/DOS compatibility problem when trying to modify the .csv files. Solution: opening the modified csv file with Notepad and save as UTF-8 file (and making sure there isn't a carriage return at the end of the file).