Hi Chris, thanks for your suggestion of adding a docBase to context.xml - that works, and so I can simplify some of our scripts as a result :-).
Just to confirm: Adding, e.g. docBase="/tmp/ROOT.war" to ROOT.xml works for me - the war is expanded into the webapps directory (nice!). However, docBase= "...[path to catalina home] /webapps/ROOT.war" doesn't, nor does a relative path such as: docBase="ROOT.war", nor does missing out this attribute. If the war and context.xml file are renamed, e.g. to myApp.war and myApp.xml - then the war will expand if it is placed inside the webapps directory. My confusion, then, has been that tomcat behaves one way for regular apps (these expand fine when dropped into the webapps directory), but differently for the ROOT app (this won't expanded when placed inside webapps) - which took me by surprise, and made me wonder if there is a bug. Andy Chris Halstead <[EMAIL PROTECTED] .com> To Tomcat Users List 08/11/2006 23:51 <users@tomcat.apache.org>, [EMAIL PROTECTED] cc Subject Re: problems with unpacking ROOT.war Hi Andy, Perhaps I'm missing a key point about what you're trying to achieve, but if you simply put your ROOT.war file *outside* of ${CATALINA_HOME}/webapps and update your ROOT.xml file with an appropriate docBase element you'll find that it unpacks just fine. To wit, this works on TC-5.5.20: --- ${CATALINA_HOME}/conf/Catalina/localhost/ROOT.xml --- <?xml version="1.0" encoding="UTF-8"?> <Context debug="1" docBase="/tmp/ROOT.war"> </Context> In fact, the war can be named anything you want. It's the context descriptor name 'ROOT' that tells Tomcat to use this app as the default. Cheers, -chris [EMAIL PROTECTED] SourceLabs,Inc - Dependable Open Source Systems [EMAIL PROTECTED] wrote: > Hi Nathan, > > I thought there must be other users out there experiencing the same > problem! No - I haven't been able to resolve my problem (ROOT.war > doesn't unpack when ROOT.xml is in conf/Catalina/localhost), and have to > work around it instead. > > I think the path attribute should be set to "" for a root application - > though I think tomcat is robust in case you do use "/". > > When I was experimenting, I was able to get the war file to expand if (1) > there wasn't a ROOT.xml in conf/Catalina/localhost and (2) ROOT.war has > META-INF/context.xml : > > http://marc.theaimsgroup.com/?l=tomcat-user&m=116107471021645&w=2 > > and I think it will also expand if ROOT.war doesn't have a META-INF > directory. > > But for our application, we need to use different context files in > different environments, and so can't ship a war file containing one context > file. So I've written ant tasks to manually unpack the war when deploying > the app locally, and when the war is released, we have to manually unpack > the war. > > ... a drag - which is why I've been chasing this problem on this list (and > I guess I should raise a bug in bugzilla?) > > cheers, > > Andy > ----------------------------------------- This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]