I am running Intellij Ultimate with Tomcat and deploy a war. Everything deploys fine to the webapp directory of tomcat.
When I change a file like an xhtml file, is there a way for tomcat to automatically pick up that change? As of right now I need to copy the file from Intellij and copy it to the directory of where it lives in the tomcat web app directory. I know there are certain files that will need a recompile, but xhtmls are not one of them.
This cannot be done if you deploy a war with IntelliJ IDEA. However, it can be if you deploy an exploded war. In IDEA:
my-webapp-name:war
my-webapp-name:war exploded
Now anytime you make a change, IDEA will redeploy the changed file(s) when IDEA's frame is deactivated (i.e. loses focus). It does take a second or two, You'll see it in the lower status bar in IDEA. Obviously. you'll still need to refresh your web browser so it fetches the new file (unless of course if the page has an auto refresh of ajax like fetch).
A good combination with Tomcat is to set "On frame deactivation" to "Update Resources" and the "On 'update' action to either "Redeploy" or "Restart Server". That allows static pages to be quickly updated via frame deactivation, and class updated via the 'update' action.
A company named ZeroTurnaround sells JRebel which is a dynamic classloader solution. They also have a five part series on the subject that's very good.