An applications WAR file is not redeployed automatically when the war file is updated. The problem is that HostConfig.checkContextLastModified() is seeing the wrong value for what it thinks is the name of the WAR file. Instead of seeing "myubc.war" it sees "ROOT" so the if (files[i].endsWith(".war")) { test at line 843 always fails since files[0]="ROOT" Here is the server.xml entries for the Context: <Engine name="myUBC" defaultHost="scandia"> <Host name="scandia" appBase="webapps" unpackWARs="true" autoDeploy="true" workDir="work"> <Context path="" docBase="/local/src/myUBC2/myubc.war" reloadable="false"> George
This is normal. Only webapps deployed in the host appBase will be redeployed. Basically, this is not the way deployment occurs (and BTW, you shouldn't put your Context in server.xml).
The webapp is in the host appBase: -Dcatalina.base=/local/src/myUBC2 And why does the code think it is looking at the name of the WAR file when it is given the name of the directotory where the WAR file was exploded to? George
Look: I am really sorry about the deployer's limitations, but you have to accept them (or use a different server). The name of the war must match the webapp name. Otherwise, use the manager webapp or Ant tasks to reload or redeploy your application.
Remy, is this a bug or a feature because the docs say this about deployment: "Redeployment of a web application which has been deployed from a WAR when the WAR is updated: the expanded web application is removed, and the WAR is expanded again. This will not happen if the host is configured so that WARs are not expanded, in which case the webapp will be simply redeployed." (From http://jakarta.apache.org/tomcat/tomcat-5.0-doc/deployer-howto.html) If I read above statement correctly it means changing a WAR file should result in its expanded directory being removed from webapps and recreated in webapps. Am I missing something?
Hello, a reload from a war works fine for me at 5.0.24/25 release. Your must deploy your web application at appBase from your host. The Deployer (HostConfig class) detect than the changed war file, delete the extracted directory and context.xml. Than the newer war Archiv was loaded and extract your META-INF/context.xml and the directory. It also work when you context.xml docPath point to the extacted directory, but this is not clever. Thing about Tomcat server that configured with Host.unpackWARS=false! The complete deployment work also for ROOT.war. I tested this and it works stable. Regards Peter
Then the documentation should be updated to reflect these "restrictions". To me, based on what I read, it made perfect sense to do: <Context path="" docBase="../myubc.war"> but when I debug the code I see "ROOT" being compared against "myubc", and not being equal, ... George