Re: problems with unpacking ROOT.war
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-userm=116107471021645w=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
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-userm=116107471021645w=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 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problems with unpacking ROOT.war
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. What are you passing for ${path}, I have been using / but I don't think this correct. 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-userm=116107471021645w=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 Nathan Wilhelmi [EMAIL PROTECTED] u To [EMAIL PROTECTED] 06/11/2006 22:33 cc Subject Re: problems with unpacking ROOT.war Hi Andrew - Have you gotten any resolution to this, I am having the same problem, although I can't get it to work even with the context.xml file in the META-INF directory. What are you passing for ${path}, I have been using / but I don't think this correct. Thanks! -Nate [EMAIL PROTECTED] wrote: Hi there, I've been having trouble persuading tomcat 5.5 to expand ROOT.war when it is dropped into webapps, and started. The problem seems to go away if ROOT.war contains META-INF/context.xml - but since we deploy this war file to different environments, shipping it with a context file isn't an option. See the email below for instructions on how to duplicate the bug. (btw, this is quite an old mailtrail, and I notice there are a couple of stray messages that should belong in this particular mail trail). I've also experimented today with the manager app, and again , when I use the deploy ant target, the app fails to start because it seems tomcat isn't expanding the war file: deploy url=${url} username=${username} password=${password} path=${path} localWar=file://${build}/ROOT.war config=file://${build}/ROOT.xml / The manager can correctly stop and undeploy the ROOT app, but when I use the above task, ROOT.war and ROOT.xml are dropped into the correct folders, but the war *isn't* expanded). ROOT.xml has the following context attributes: Context debug=1 reloadable=true antiResourceLocking=true antiJARLocking=true and host has the usual defaults: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false My question is: has anyone else experienced similar problems with expanding ROOT.war?My work around is to write ant targets and scripts to manually expand the war... however I'd like to understand if this is a bug, or just a quirk of my setup. If it is a bug, then I'd like to submit this to tomcat's bugzilla. thanks Andy [EMAIL PROTECTED] mchase.com To 18/10/2006 09:32 Tomcat Users List users@tomcat.apache.org cc Please respond to Tomcat Users Subject List RE: problems with unpacking [EMAIL PROTECTED] ROOT.war che.org Hi Charles, Neither one is correct. You must NOT use the path attribute in a Context element unless the Context is defined in server.xml. The URI path to the app is determined
RE: problems with unpacking ROOT.war
Hi there, I've been having trouble persuading tomcat 5.5 to expand ROOT.war when it is dropped into webapps, and started. The problem seems to go away if ROOT.war contains META-INF/context.xml - but since we deploy this war file to different environments, shipping it with a context file isn't an option. See the email below for instructions on how to duplicate the bug. (btw, this is quite an old mailtrail, and I notice there are a couple of stray messages that should belong in this particular mail trail). I've also experimented today with the manager app, and again , when I use the deploy ant target, the app fails to start because it seems tomcat isn't expanding the war file: deploy url=${url} username=${username} password=${password} path=${path} localWar=file://${build}/ROOT.war config=file://${build}/ROOT.xml / The manager can correctly stop and undeploy the ROOT app, but when I use the above task, ROOT.war and ROOT.xml are dropped into the correct folders, but the war *isn't* expanded). ROOT.xml has the following context attributes: Context debug=1 reloadable=true antiResourceLocking=true antiJARLocking=true and host has the usual defaults: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false My question is: has anyone else experienced similar problems with expanding ROOT.war?My work around is to write ant targets and scripts to manually expand the war... however I'd like to understand if this is a bug, or just a quirk of my setup. If it is a bug, then I'd like to submit this to tomcat's bugzilla. thanks Andy [EMAIL PROTECTED] mchase.com To 18/10/2006 09:32 Tomcat Users List users@tomcat.apache.org cc Please respond to Tomcat Users Subject List RE: problems with unpacking [EMAIL PROTECTED] ROOT.war che.org Hi Charles, Neither one is correct. You must NOT use the path attribute in a Context element unless the Context is defined in server.xml. The URI path to the app is determined from the name of the .xml file in the conf/[engine]/[host] directory. Thanks for the feedback and the correction. OK - I have a very simple war file named ROOT.war - it doesn't a META-INF directory. I have placed a file called ROOT.xml into conf/Catalina/localhost with: ?xml version=1.0 encoding=UTF-8? Context debug=1 /Context Server.xml has the defaults that come with tomcat 5.5.17: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false I put ROOT.war into the webapps directory and start tomcat -- ROOT.war isn't expanded. Any other suggestions? Or might this be a bug? thanks for your help, Andy Caldarale, Charles R Chuck.Caldarale@ To unisys.com Tomcat Users List users@tomcat.apache.org 17/10/2006 14:58 cc Subject Please respond to RE: problems with unpacking Tomcat Users ROOT.war List [EMAIL PROTECTED] che.org From: Michael Courcy [mailto:[EMAIL PROTECTED] Subject: Re: problems with unpacking ROOT.war Maybe a stupid clue but instead of Context path= debug=1 /Context What happen if u try Context path=/ debug=1 /Context Neither one is correct. You must NOT use the path attribute in a Context element unless the Context is defined in server.xml. The URI path to the app is determined from the name of the .xml file in the conf/[engine]/[host] directory. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only
Re: problems with unpacking ROOT.war
Andrew- since the manager app is used to implement the decompression of the war I would set privilieged = true If the decompression error only occurs using Ant deploy task I would ping ant users list user@ant.apache.org Anyone else? M- This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Friday, November 03, 2006 8:04 AM Subject: RE: problems with unpacking ROOT.war Hi there, I've been having trouble persuading tomcat 5.5 to expand ROOT.war when it is dropped into webapps, and started. The problem seems to go away if ROOT.war contains META-INF/context.xml - but since we deploy this war file to different environments, shipping it with a context file isn't an option. See the email below for instructions on how to duplicate the bug. (btw, this is quite an old mailtrail, and I notice there are a couple of stray messages that should belong in this particular mail trail). I've also experimented today with the manager app, and again , when I use the deploy ant target, the app fails to start because it seems tomcat isn't expanding the war file: deploy url=${url} username=${username} password=${password} path=${path} localWar=file://${build}/ROOT.war config=file://${build}/ROOT.xml / The manager can correctly stop and undeploy the ROOT app, but when I use the above task, ROOT.war and ROOT.xml are dropped into the correct folders, but the war *isn't* expanded). ROOT.xml has the following context attributes: Context debug=1 reloadable=true antiResourceLocking=true antiJARLocking=true and host has the usual defaults: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false My question is: has anyone else experienced similar problems with expanding ROOT.war?My work around is to write ant targets and scripts to manually expand the war... however I'd like to understand if this is a bug, or just a quirk of my setup. If it is a bug, then I'd like to submit this to tomcat's bugzilla. thanks Andy [EMAIL PROTECTED] mchase.com To 18/10/2006 09:32 Tomcat Users List users@tomcat.apache.org cc Please respond to Tomcat Users Subject List RE: problems with unpacking [EMAIL PROTECTED] ROOT.war che.org Hi Charles, Neither one is correct. You must NOT use the path attribute in a Context element unless the Context is defined in server.xml. The URI path to the app is determined from the name of the .xml file in the conf/[engine]/[host] directory. Thanks for the feedback and the correction. OK - I have a very simple war file named ROOT.war - it doesn't a META-INF directory. I have placed a file called ROOT.xml into conf/Catalina/localhost with: ?xml version=1.0 encoding=UTF-8? Context debug=1 /Context Server.xml has the defaults that come with tomcat 5.5.17: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false I put ROOT.war into the webapps directory and start tomcat -- ROOT.war isn't expanded. Any other suggestions? Or might this be a bug? thanks for your help, Andy Caldarale, Charles R Chuck.Caldarale@ To unisys.com Tomcat Users List users@tomcat.apache.org 17/10/2006 14:58
RE: problems with unpacking ROOT.war
Charles, To follow up on this thread, is it possible for the appBase and the docBase to be set the same? I believe I've tried this but it required me to put the appBase within or under the docBase folder. To simplify the issue, I would like all servlets/jsps/war files to be all in public_html. I believe I posted another thread with regards to that (perhaps we are having email issues), I also tried looking into the docs to see if there are any restrictions to these, if you have any docs/links I will try to folow them to understand them more.. perhaps I just don't understand how they really work yet. (learning tomcat stage). I will try to setup what you've mentioned, perhaps this will give me an idea how to make them work. Thanks, Rizalino -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, October 19, 2006 11:05 PM To: Tomcat Users List Subject: RE: problems with unpacking ROOT.war From: Rizalino DeVilleres [mailto:[EMAIL PROTECTED] Subject: RE: problems with unpacking ROOT.war Is there another work around to get them both working? I believe, this is the same setup we've had on the previous versions of Tomcat, we simply want to place all the war/JSPs files in the public_html and servlets as mentioned above. The intent of the Servlet and JSP specs is to define the environment for execution of web _applications_, not arbitrary JSP files. All JSP files must be part of some context; you can use ROOT if no other context is appropriate. By default, each subdirectory and war file under the host's appBase should be a deployable webapp, using the file structure defined by the servlet spec. Tomcat lets you avoid building such a file structure if you place a Context element in the conf/[engine]/[host]/[appname].xml file. If I intrepreted your requirements properly, you should try the following: 1) Specify /path/to/public_html as your host's appBase. 2) Put your ROOT.xml in conf/[engine]/[host] specifying a docBase of servlet. 3) Place your unassociated JSP files in the /path/to/public_html/servlet directory. 4) Put your war files or app directories (expanded wars) in the /path/to/public_html directory (NOT /path/to/public_html/servlet). The name of each subdirectory or war file becomes the URI path to the app. 5) Do not put a WEB-INF subdirectory under /path/to/public_htmi/servlet, unless you want the contents of that subdirectory deployed as both the default app and servlet. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problems with unpacking ROOT.war
From: Rizalino DeVilleres [mailto:[EMAIL PROTECTED] Subject: RE: problems with unpacking ROOT.war To follow up on this thread, is it possible for the appBase and the docBase to be set the same? No, they're different concepts. The appBase attribute defines the default location for your collection of webapps for a given host; if autoDeploy is on, all .war files and properly formatted subdirectories under appBase are deployed at Tomcat startup. The docBase attribute is the specific directory or .war file for a single webapp, and is defined in that webapp's Context element. If the webapp is stored under appBase, you may not even need a Context element and you must not have a docBase setting. The docBase attribute should be used only when the webapp's Context element is in an .xml file under conf/[engine]/[host] or in server.xml (as noted previously, the latter is strongly discouraged). To simplify the issue, I would like all servlets/jsps/war files to be all in public_html. You're mixing up entities from different levels of the hierarchy. A .war file contains a complete webapp - a standalone component; a servlet or .jsp is part of a webapp - not a standalone component. All servlets and jsps must be part of some webapp or another, as noted in the previous posting you quoted. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problems with unpacking ROOT.war
From: Rizalino DeVilleres [mailto:[EMAIL PROTECTED] Subject: RE: problems with unpacking ROOT.war Is there another work around to get them both working? I believe, this is the same setup we've had on the previous versions of Tomcat, we simply want to place all the war/JSPs files in the public_html and servlets as mentioned above. The intent of the Servlet and JSP specs is to define the environment for execution of web _applications_, not arbitrary JSP files. All JSP files must be part of some context; you can use ROOT if no other context is appropriate. By default, each subdirectory and war file under the host's appBase should be a deployable webapp, using the file structure defined by the servlet spec. Tomcat lets you avoid building such a file structure if you place a Context element in the conf/[engine]/[host]/[appname].xml file. If I intrepreted your requirements properly, you should try the following: 1) Specify /path/to/public_html as your host's appBase. 2) Put your ROOT.xml in conf/[engine]/[host] specifying a docBase of servlet. 3) Place your unassociated JSP files in the /path/to/public_html/servlet directory. 4) Put your war files or app directories (expanded wars) in the /path/to/public_html directory (NOT /path/to/public_html/servlet). The name of each subdirectory or war file becomes the URI path to the app. 5) Do not put a WEB-INF subdirectory under /path/to/public_htmi/servlet, unless you want the contents of that subdirectory deployed as both the default app and servlet. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problems with unpacking ROOT.war
Hi Charles, Neither one is correct. You must NOT use the path attribute in a Context element unless the Context is defined in server.xml. The URI path to the app is determined from the name of the .xml file in the conf/[engine]/[host] directory. Thanks for the feedback and the correction. OK - I have a very simple war file named ROOT.war - it doesn't a META-INF directory. I have placed a file called ROOT.xml into conf/Catalina/localhost with: ?xml version=1.0 encoding=UTF-8? Context debug=1 /Context Server.xml has the defaults that come with tomcat 5.5.17: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false I put ROOT.war into the webapps directory and start tomcat -- ROOT.war isn't expanded. Any other suggestions? Or might this be a bug? thanks for your help, Andy Caldarale, Charles R Chuck.Caldarale@ To unisys.com Tomcat Users List users@tomcat.apache.org 17/10/2006 14:58 cc Subject Please respond to RE: problems with unpacking Tomcat Users ROOT.war List [EMAIL PROTECTED] che.org From: Michael Courcy [mailto:[EMAIL PROTECTED] Subject: Re: problems with unpacking ROOT.war Maybe a stupid clue but instead of Context path= debug=1 /Context What happen if u try Context path=/ debug=1 /Context Neither one is correct. You must NOT use the path attribute in a Context element unless the Context is defined in server.xml. The URI path to the app is determined from the name of the .xml file in the conf/[engine]/[host] directory. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problems with unpacking ROOT.war
Maybe a stupid clue but instead of Context path= debug=1 /Context What happen if u try Context path=/ debug=1 /Context [EMAIL PROTECTED] a écrit : Hi again, OK - here are some steps you can try out to reproduce the problem I am experiencing - I'm hoping this will tempt someone into taking a look :-). The problem we have is that tomcat 5.5.x (I tried 5.5.12 and 5.5.17) won't unpack ROOT.war when it is started up, if a file called ROOT.xml is present in conf/Catalina/localhost. (1) Build a simple webapp, for example containing: success.html WEB-INF/web.xml and place these into a war file called ROOT.war. (2) Place a ROOT.xml context file into conf/Catalina/localhost with: ?xml version=1.0 encoding=UTF-8? Context path= debug=1 /Context The server.xml file can stick to the defaults that you get with tomcat 5.5.17 (or 5.5.12): Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false (3) Delete any directory under webapps called ROOT, and drop the war file into webapps. (4) Start tomcat. -- doesn't unpack war. (5) delete ROOT.xml from conf/Catalina/localhost, and restart tomcat -- does unpack the war file. Similarly, a war file containing META-INF/context.xml will be deployed, as long as there isn't a file called ROOT.xml inside conf/Catalina/localhost. The problem for us is that we would like to deploy the war on different servers, offering different JNDI resources. So shipping a war file containing a context.xml isn't an option for us. I have searched the mailing lists for a solution to this problem, but so far without luck. There was a useful mail trail last year that resulted in a document being placed in bugzilla containing instructions on how to deploy a root app using tomcat's manager ( http://issues.apache.org/bugzilla/show_bug.cgi?id=35063). However our production environments don't support the manager app. I have tried tweaking some of the parameters. For example, if I set a docBase of ${CATALINA_HOME}/webapps/ROOT, I'll see a warning in the logs saying that a docBase [...] inside the host appBase has been specified, and will be ignored - which at least shows that ROOT.xml is being parsed. Likewise, changing the the docBase to point to a directory outside of ${CATALINA_HOME} doesn't solve the problem. (Am I right in thinking docBase *isn't* a required attribute? If I leave this out of ROOT.xml, and expand the war file manually, the ROOT app will pick up JNDI resources correctly). I've also played with some of the host attributes in server.xml, e.g. adding deployOnStartup=true to server.xml (it is true by default), or setting autoDeploy=false, but none of these tweaks helped. So - is it a bug (or a feature?!) that ROOT.war won't unpack if ROOT.xml is already present in conf/Catalina/localhost? Thanks for any help, Andy Cooke Hi there, We have been finding it difficult to persuade tomcat (5.5.12 and 5.5.17) to unpack a ROOT.war file, either when starting up tomcat from scratch, or hot-deploying. We *were* able to get tomcat to expand the war file if it contains a META-INF directory containing a context.xml file. However if this directory is missing from the war, and instead a ROOT.xml context file is present in conf/Catalina/localhost before starting tomcat - the war file *isn't* expanded. Our server.xml file contains the default settings (unpackWARs=true autoDeploy=true). Any ideas? We would rather not include context.xml files in the war, as the same war file will be deployed on different servers, which require different JNDI resources. thanks Andy Cooke - 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] - To start a new topic, e-mail: users@tomcat.apache.org
Re: problems with unpacking ROOT.war
Hi Michael, thanks for the response. I tried this - but no luck. In any case, I'm pretty sure for the default web app (ROOT), you should set a path of : If you specify a context path of an empty string (), you are defining the default web application for this Host, which will process all requests not assigned to other Contexts. (from: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html) cheers, Andy Michael Courcy [EMAIL PROTECTED] mail.com To Tomcat Users List 17/10/2006 11:23 users@tomcat.apache.org cc Please respond to Subject Tomcat Users Re: problems with unpacking List ROOT.war [EMAIL PROTECTED] che.org Maybe a stupid clue but instead of Context path= debug=1 /Context What happen if u try Context path=/ debug=1 /Context [EMAIL PROTECTED] a écrit : Hi again, OK - here are some steps you can try out to reproduce the problem I am experiencing - I'm hoping this will tempt someone into taking a look :-). The problem we have is that tomcat 5.5.x (I tried 5.5.12 and 5.5.17) won't unpack ROOT.war when it is started up, if a file called ROOT.xml is present in conf/Catalina/localhost. (1) Build a simple webapp, for example containing: success.html WEB-INF/web.xml and place these into a war file called ROOT.war. (2) Place a ROOT.xml context file into conf/Catalina/localhost with: ?xml version=1.0 encoding=UTF-8? Context path= debug=1 /Context The server.xml file can stick to the defaults that you get with tomcat 5.5.17 (or 5.5.12): Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false (3) Delete any directory under webapps called ROOT, and drop the war file into webapps. (4) Start tomcat. -- doesn't unpack war. (5) delete ROOT.xml from conf/Catalina/localhost, and restart tomcat -- does unpack the war file. Similarly, a war file containing META-INF/context.xml will be deployed, as long as there isn't a file called ROOT.xml inside conf/Catalina/localhost. The problem for us is that we would like to deploy the war on different servers, offering different JNDI resources. So shipping a war file containing a context.xml isn't an option for us. I have searched the mailing lists for a solution to this problem, but so far without luck. There was a useful mail trail last year that resulted in a document being placed in bugzilla containing instructions on how to deploy a root app using tomcat's manager ( http://issues.apache.org/bugzilla/show_bug.cgi?id=35063). However our production environments don't support the manager app. I have tried tweaking some of the parameters. For example, if I set a docBase of ${CATALINA_HOME}/webapps/ROOT, I'll see a warning in the logs saying that a docBase [...] inside the host appBase has been specified, and will be ignored - which at least shows that ROOT.xml is being parsed. Likewise, changing the the docBase to point to a directory outside of ${CATALINA_HOME} doesn't solve the problem. (Am I right in thinking docBase *isn't* a required attribute? If I leave this out of ROOT.xml, and expand the war file manually, the ROOT app will pick up JNDI resources correctly). I've also played with some of the host attributes in server.xml, e.g. adding deployOnStartup=true to server.xml (it is true by default), or setting autoDeploy=false, but none of these tweaks helped. So - is it a bug (or a feature?!) that ROOT.war won't unpack if ROOT.xml is already present in conf/Catalina/localhost? Thanks for any help, Andy Cooke Hi there, We have been finding it difficult to persuade tomcat (5.5.12 and 5.5.17) to unpack a ROOT.war file, either when starting up tomcat from scratch, or hot-deploying. We *were* able to get tomcat to expand the war file if it contains a META-INF directory containing a context.xml file. However if this directory is missing from the war, and instead a ROOT.xml context
RE: problems with unpacking ROOT.war
From: Michael Courcy [mailto:[EMAIL PROTECTED] Subject: Re: problems with unpacking ROOT.war Maybe a stupid clue but instead of Context path= debug=1 /Context What happen if u try Context path=/ debug=1 /Context Neither one is correct. You must NOT use the path attribute in a Context element unless the Context is defined in server.xml. The URI path to the app is determined from the name of the .xml file in the conf/[engine]/[host] directory. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]