I'm trying to develop a web application using Intellij Ultimate ver 2020.1.4 and Tomcat ver 8.5.23.
Whenever I try to run the program through Intellij, if I make some changes (particularly to the html or javascript files) and try to update, then the changes don't appear in the browser. Depending on if I'm deploying using a WAR Archive or a WAR Exploded Archive, it sometimes uses even older versions of my files that I've long since written over!
I've tried editing the configuration to rebuild the artifact before deployment, to redeploy on 'Update' or frame deactivation, to run in debug mode, but nothing seems to work consistently.
The basic structure of my application looks like this:
LogicEngine (module)
-src (dir)
--User (dir)
---User (dir)
----User.java
----UserManager.java
WebApp (module)
-src (dir)
--sdm (dir)
---servlets (dir)
----ChatServlet.java
--web(dir)
---sharedresources (dir)
---- jquery
---pages (dir)
---- homepage (dir)
-----homepage.html
-----homepage.css
-----homepage.js
--WEB-INF
---web.xml
-index.html
I run the application from intellij and make changes to homepage.js. When I click 'Update'--> Redeploy, and then hit refresh on the browser, the changes don't appear (I know because I check the js file using developer tools). Restarting the server doesn't work either. The only thing that has seemed to work (and even this not reliably) is if I remove the artifacts from the project and the webapp from Tomcat, create them all over again, and then click 'run'.