-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Miguel,
On 8/6/12 3:26 PM, Miguel Almeida wrote: > Consider the following context file jamesbond.xml in > $CATALINA_BASE/conf/[engine_name]/[host_name]): > > <Context docBase="/srv/apps/jamesbond.war" unpackWAR="true" > debug="0" privileged="true"> <Environment name="my.env" value="VAL" > type="java.lang.String" override="true"/> </Context> > > *1)* In Tomcat 6 you'd update the war at /srv/apps and it would > automatically be redeployed and exploded. > > However, in Tomcat 7 this isn't happening. >> From the docs >> (http://tomcat.apache.org/tomcat-7.0-doc/config/host.html), a > new important text that wasn't in 6 reads: unpackWARs - (...) WAR > files located outside of the Host's *appBase* will not be > expanded. > > And in > http://tomcat.apache.org/tomcat-7.0-doc/config/host.html#Automatic%20Application%20Deployment: > > - - When using automatic deployment, the docBase defined by an XML > Context<http://tomcat.apache.org/tomcat-7.0-doc/config/context.html>file > > should be outside of the > appBase directory. If this is not the case, difficulties may be > experienced deploying the web application or the application may be > deployed twice. The deployIgnore attribute can be used to avoid > this situation. > > Both these rules means you can't have automatic deployment of files > outside appBase and explode them (into appBase). Do you mean "automatic deployment" or "automatic redeployment"? If you want to update a WAR file that is outside of the appBase, then update the WAR file and then 'touch' the XML file in $CATALINA_BASE/conf/[engine_name]/[host_name]/jamesbond.xml. > Why is this? How can one have the same behaviour as in Tomcat 6: > have the war* outisde appBase*, use a context xml like the one > above and have the application exploded. Do you really care about the WAR file being exploded? If this is really a complaint about your question #2 (handled by others separately within this thread), then you should be using the temp dirs instead of getRealPath and you won't have to worry about the lack of WAR-explosion anymore. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAhRK0ACgkQ9CaO5/Lv0PBElgCff5o8N1rNnTKAZ1HHRKxBqKTU t+oAmwWEcvU1uDLWX6zkYNT+QnhLSqxk =Z6qA -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org