After 3 days playing around with Tomcat Manager, I have some lessons to
share with you Paul.

-> If you Deploy, you have only use Undeploy. Install -> Remove. No
exception.
-> You have to create a context.xml and package it into META-INF.

When I deploy:
- war is uploaded to manager/myapp;
- context.xml is unpacked into the same directory and renamed to myapp.xml;
- A context entry is created in server.xml. the docBase in your context.xml
is replaced by "....../manager/myapp.war";
- WEB-INF/lib and WEB-INF/classes are copied to work/myapp;
- if unpackWar="true", war will be unpacked into webapps/myapp; (Jacob has a
different observation)
- myapp is started.

When I undeploy:
- myapp is gracefully shutdown;
- context entry is removed from server.xml


-----Original Message-----
From: Paul Christmann [mailto:[EMAIL PROTECTED] 
Sent: June 6, 2003 10:31 AM
To: [EMAIL PROTECTED]
Subject: Re: Tomcat Manager deploy and undeploy

Jacob Kjome wrote:
> 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.
> 
> 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???

OK, now I'm thoroughly confused.  I believe your description of what you 
see, and I believe that is what I *should* be seeing.  However, its 
clearly NOT what I'm seeing.  And sure, I assume I'm doing something 
wrong, but I have no idea *what* (especially since I'm doing the same 
steps that worked with all Tomcat releases up to 4.1.18-LE).

+ I'm using the ant manager tasks for everything 
(org.apache.catalina.ant.DeployTask and 
org.apache.catalina.ant.UndeployTask).
+ My build file first runs "undeploy", then "deploy".
+ I uninstalled my old Tomcat instance, which fully removed the 
TOMCAT_HOME folder.
+ I installed Tomcat 4.1.24-LE.
+ I ran my ant tasks to deploy my webapp.

After this, I end up with:
+ <Context> entry for my webapp in my server.xml that points docBase to 
TOMCAT_HOME/webapps/[webapp].
+ TOMCAT_HOME/webapps/[webapp] containing the expaned contents of my war.
+ War ends up in TOMCAT_HOME/work/Standalone/localhost/manager/[webapp].war

Then I have to use org.apache.catalina.ant.RemoveTask to remove the 
webapp (deleting the TOMCAT_HOME/webapps/[webapp] folder and the 
<Context> entry.

*Then*, if I modify the "unpackWARs" attribute of the <Host> element in 
my server.xml (setting it to false) and do exactly the same steps as 
above, I get the behavior I expect: the webapp is *not* unpacked, and 
its docBase points to the 
TOMCAT_HOME/work/Standalone/localhost/manager/[webapp].war

*EVEN* if I then change unpackWARs back to true and redploy, I get the 
behavior I described originally -- the WAR is unpacked!  SO even once I 
have the correct <Context> entry, redeployment changes the entry and 
unpacks the war. :(

Am I really the only one that is seeing this behavior??? :( :(

What am *I* doing????  I'd really like to figure out what I've done 
wrong.  Please help....

-- 
PC

Paul Christmann
Prior Artisans, LLC
mailto:[EMAIL PROTECTED]
504-587-9072



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to