Having added context.xml, Deploy/Undeploy works perfectly for me now EXCEPT
Undeploy doesn't delete work/....../myapp. However, Tomcat will take care of
that because it checks if the file has been changed and reload the updated
file. Maybe that's why the directory is not removed.

-----Original Message-----
From: Jacob Kjome [mailto:[EMAIL PROTECTED] 
Sent: June 6, 2003 11:25 AM
To: Tomcat Users List
Subject: RE: Tomcat Manager deploy and undeploy

At 11:10 AM 6/6/2003 -0400, you wrote:
>- GUI's Upload task is not a Deploy task. It is described in the manager
>html-doc.

Yes, just wanted to clarify as I wasn't sure if you or Paul were mixing 
concepts or not.  It is apparent you weren't mixing concepts.

>- Deploy via Tomcat Manager creates context in server.xml for the app with
>docBase pointing to manager/myapp.war.

Yep

>- I have tested pack/unpack. If I set unpackWar to false, Tomcat (not
>Manager) will not unpack war. If unpackWar="true", war is unpacked after it
>is deployed by Manager. Either way, Undeploy will not remove unpacked
>directory and work directory.

Again, this seems to point to your app being added to the webapps 
directory.  Tomcat only unpacks WARs which are in its default "appBase" 
which, by default, is CATALINA_HOME/webapps.  Nothing outside this is 
affected by Tomcat's automatic expasion of WAR files.  So, if your .war 
file exists under the "manager" under the "work" directory structure, the 
"unpackWARs" attribute on the <Host> should be of no consequence.

What Tomcat (or the manager app) does do (as I've explained before) is 
expand certain parts of the .war file to the particular webapp's work 
directory.  These included WEB-INF/classes and WEB-INF/lib.  That's 
it.  Nothing else seems to be unpacked.  One thing I have noticed is that 
an "undeploy" does not remove the unpacked "WEB-INF" stuff under the 
webapp's work directory.  I'm not sure what the consequences of that are or 
if there are any?

All that said, I have seen a case where an "undeploy" doesn't remove the 
.war file or the entry in server.xml, causing redeployment of the webapp 
after a server restart.  I haven't figured out how to reproduce that 
becuause now my behavior is totally back to normal.  So, I grant you that 
there are some weird things going on, but I've never, ever, seen the .war 
file added to webapps or unpacked to webapps.

Jake

>-----Original Message-----
>From: Jacob Kjome [mailto:[EMAIL PROTECTED]
>Sent: June 6, 2003 12:11 AM
>To: Tomcat Users List
>Subject: RE: Tomcat Manager deploy and undeploy
>
>At 02:48 PM 6/5/2003 -0400, you wrote:
> >There is nothing wrong with both of you. My interpretation is inaccurate.
>It
> >should be:
> >
> >1. *Tomcat Manager* deployed myapp from myapp.war
> >2. *Tomcat* unpacked myapp.war because unpackWar="true" in server.xml
>
>Tomcat wouldn't unpack myapp.war even if unpackWar="true" unless myapp.war
>actually found its way into the appBase of the host which by default in
>Tomcat is CATALINA_HOME/webapps.  Using the Tomcat ant manager tasks to
>"deploy" a .war to Tomcat, this simply doesn't happen.  The .war is not
>copied to the appBase and, therefore, does not get unpacked under the
>appBase.
>
> >Since context's docBase is the war (if deployed by *Tomcat Manager*), it
> >makes no sense unpacking the war.
>
>If the docBase points to the .war file, even if the <Host> has
>unpackWARs="true", the .war file will not be unpacked.  I think this is
>what you are saying, although I'm not sure.  I just tested it and it works
>just as I've described.  I'm not sure what Paul is doing to get the
>behavior he see's???
>
>I'd just like to clarify something.  When I say "deploy", I mean deploying
>the .war file via the Catalina Ant manager "deploy" task.  Likewise, when I
>say "undeploy", I mean via the the Catalina Ant manager "undeploy" task.  I
>do not mean the new feature in the html manager gui where one can upload a
>.war file.  I haven't tried that.  It must work differently than the Ant
>manger "deploy" task because no browser out there supports http PUT which
>is what the Ant manager task uses to "deploy".
>
>So, make sure you don't mix these concepts and make sure you don't mix up
>"remove" and "undeploy" because mixing them will very likely give you
>unpredictable behavior.
>
>Jake
>
> >-----Original Message-----
> >From: Paul Christmann [mailto:[EMAIL PROTECTED]
> >Sent: June 5, 2003 1:54 PM
> >To: [EMAIL PROTECTED]
> >Subject: Re: Tomcat Manager deploy and undeploy
> >
> > > Phillip Qin wrote:
> > >> - war is uploaded to $CATALINA/work/Standalone/my.host/manager;
> >  >> - war is unpacked into $CATALIAN_HOME/webapps/myapp;
> >
> >  > Jacob Kjome wrote:
> > > completely false
> >
> >I have to agree with Phillip -- I've seen (and reliably reproduced) this
> >behavior with Tomcat 4.1.24-LE.  The only way I got around problems
> >caused by this (undeploy would not work if the app had been unpacked in
> >the CATALINA_HOME/webapps folder, but remove would) was to modify the
> >distributed server.xml, adding unpackWARs="false" to the <Host> entry.
> >
> >I'd love to know *what* (if anything) I'm doing wrong, or have
> >configured wrong.  But I've reproduced this multiple times on 3
> >different Windows 2X servers with clean 4.1.24-LE installations.
> >
> >PC
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to