This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Is it possible to source a remote WAR file (hosted on an Apache Web Server inside the htdocs folder as a resource) into an Apache Tomcat 6.x server? The idea is for the Tomcat to source in the latest WAR file during boot time.
Originally posted by Pushkal Mishra: Or in some cryptic temp structure inside Tomcat?
It can work either way, but I don't think that the method used when you've got Tomcat configured not to unpack war files is all that cryptic. When deployed this way, the war file gets unzipped into Tomcat's work directory.
One thing to note, is that dropping a new version of a war file on top of an existing one is like unzipping one directory structure onto an old one. It will add files that weren't there, previously. It won't remove files just because they don't exist in the new war file. And on Windows, at least, I've found that it won't always update a jar with the new version. This might be due to the Windows Service locking jar files. Also, if the JSP's file dates in the new war file are older than the ones already in service Tomcat won't know to re-compile them.
Personally, I prefer to undeploy first to make sure that the new version is starting out with a clean slate.