when I change file in my webproject i have to always testart tomcat. It is possible see the file changed without restart tomcat?
How it is possible?
I read some tutorial and suggest someone to put reloable == true. But I don't understand.
I have tomcat integrate with eclipse.
I am also searching for a solution to change, add or remove java or jsf files without restarting the application.
The solution explained here, doesn't work.
I'm using tomcat 7 and having an application in webapps folder.
When I call e.g. "localhost/app/index.xhtml" I see the page as I expected. When I change something in this or another file, waiting some time and reloading this page, nothing changed.
Looking in "work/Catalina/localhost/app" I see no files, which I could delete to retranslate existing source files.
Where does Tomcat 7 store the files or what do I have to do to make changes while running?
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.