Jesse,

In order for unpackWar to work two things must be true.
1. The application directory and any subdirectories for that context/app
cannot exist.
2. You must place the war in the webapps directory.


So if you have an app called getmoney then to redeploy the war you will need
to delete the directory getmoney. Then place the war in the webapps
directory. Tomcat will create the directory structure and expand the war.
When you use the manager to redeploy an app this is what it does behind the
scenes.

The context can stay in the server.xml. One problem I have is that I have to
restart Tomcat for the app to see any resources defined in the context.

Doug
www.parsonstechnical.com

----- Original Message ----- 
From: "Jesse Vitrone" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Thursday, March 18, 2004 11:43 AM
Subject: RE: Context mapping and war


> Thanks, for now, I think I'm just going to set the docBase to be the war
> file.
>
> Jesse
>
> -----Original Message-----
> From: Chong Yu Meng [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 18, 2004 11:35 AM
> To: Tomcat Users List
> Subject: Re: Context mapping and war
>
>
> Jesse Vitrone wrote:
>
> >When I try to install my application, I put the war file in the webapps
> >directory, and in the server.xml I add a <context> mapping.  When I
> >start Tomcat, my war file isn't getting extracted.
> >
> >Unpack wars is set to true:
> >
> >      <Host name="localhost" debug="0" appBase="webapps"
> >       unpackWARs="true" autoDeploy="true">
> >
> >If I comment out my <context>, the war gets extracted, but I need the
> >context mapping.  Once the war is extracted, I can put the <context>
> >mapping in and everything works fine.
> >
> >Any idea why my war isn't getting extracted when the mapping is in
> >there?
> >
> >
> >
> >
> Here's what I think is the reason, but I may be wrong ...
>
> If you are deploying a WAR file, Tomcat doesn't need to know anything
> about it initially (that is, no context entry in server.xml). You just
> create a directory, drop the WAR package there and start Tomcat. The WAR
> file will get unpackaged. No entry will be added into server.xml though.
>
> If you add the context mapping before deploying the WAR file, Tomcat
> assumes that you know what you are doing and automatically expects a web
> application at the docBase location, not a WAR file. If it finds a WAR
> file, it will assume that there is an error (because it is not finding
> what it expects to find).
>
> Am I close ? Anyway, whatever the reason, I don't think switching to
> Tomcat 5 will change this behaviour. I've done a little testing with WAR
> packages -- though not extensively.
>
> -- 
> "We must respect the other fellow's religion, but only in the sense and to
> the extent that we respect his theory that his wife is beautiful and his
> children are smart."
> -- Henry Mencken
> +----------------------------------------------------------------+
> | Pascal Chong                                                   |
> | email: [EMAIL PROTECTED]                                  |
> |                                                                |
> | Please visit my site at : http://cymulacrum.net                |
> | If you're using my documentation, please read the Terms and    |
> | and Conditions at http://cymulacrum.net/terms.html             |
> +----------------------------------------------------------------+
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

Reply via email to