Technically, this should have been a new
thread. The original conversation ended a month ago, and we're shifting the subject a bit here. Whatever. Just a reminder that we don't charge people extra for starting their own threads!
"xhtml" is a little vague, unfortunately. In the literal meaning, it would be an HTML file that follows the XML (xhtml) schema. However, such files commonly have the extension of ".htm" or ".html". In fact, I spent some time going in circles the other day because I'd forgotten that when attempting to assemble an eBook file. And HTML files, regardless of which schema/DTD you code them under are served up verbatim to the client by Tomcat.
".xhtml" as a filename extension, however, is the conventional extension for JSF Facelets View Definition Language (VDL) files. In this case, the VDL source is compiled as part of the process of creating the JSF component tree. But the component tree is continually being updated, so chances that changes to those files won't get picked up rapidly are very low. And, in point of fact, I routinely tweak xhtml on the fly as part of the ongoing war between me and CSS to get JSF pages to lay out properly. Since I have Tomcat aimed at my project's target directory, all it takes is a "mvn -o war:exploded" to do so. Followed by "F5" (refresh) to update the browser display.
On the other hand, Tomcat
will experience varying behavior for java code and JSPs because the file isn't merely being copied, it's being loaded (as a class) into the JVM. By default, Tomcat will scan the WAR every second or 2 and pick up the class changes at that time, although static initializations done when the class initially loaded may not get repeated. However, if someone has been playing with Tomcat settings, the interval may be different.
It does bear repeating that if you use the common practice of creating a WAR file and copying it to TOMCAT_HOME/webapps, Tomcat will "explode" that WAR into a corresponding directory by default and
use the exploded directory as a codebase. If you update the WAR file and copy it again, the exploded copy of the WAR will, however,
not be updated. The WAR is only exploded once.