On Sat, 10 Aug 2002, Andrew wrote:

> Date: Sat, 10 Aug 2002 12:18:50 -0400
> From: Andrew <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: unpacking of WAR
>
> Craig, I was under the impression that the WAR would only be expanded if
> there was no existing Context of that name.  Is this correct?
>

That's true.  And any auto-expanded directory will *not* be modified if
you update the WAR and restart Tomcat.  That's because people would still
modify the deployed files (in the expanded directory) instead of going
back to their original sources, and get annoyed when their in-place
updates got wiped out.

Personally, I never use the webapps directory any more -- the custom Ant
install and deploy tasks (Tomcat 4.1.x) are really cool.  My normal
development cycle for a webapp:

* Start Tomcat and just leave it running (if not already started)

* Run "ant compile" to build my webapp into a "build/webapp" subdirectory

* Run "ant install" to dynamically install it on Tomcat, passing the
  directory name of my "build/webapp" directory.

* If I need to modify something, I do it and run "ant compile reload"
  to reload the app.

* To clean up, "ant remove".

There's a fully worked out build.xml file that supports all of this in the
Application Developer's Guide document that ships with Tomcat 4.1.

  http://localhost:8080/tomcat-docs/appdev/

The 4.1.x codebase is nearing release quality; you should really start
playing with the new features if you haven't yet.  You'll never go back to
the "webapps" directory again :-).

> - Andrew
>

Craig


> > -----Original Message-----
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, August 10, 2002 1:01 AM
> > To: Tomcat Users List
> > Subject: Re: unpacking of WAR
> >
> >
> >
> >
> > On Fri, 9 Aug 2002, Paul Phillips wrote:
> >
> > > Date: Fri, 09 Aug 2002 22:49:00 -0500
> > > From: Paul Phillips <[EMAIL PROTECTED]>
> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > To: Tomcat Users List <[EMAIL PROTECTED]>
> > > Subject: unpacking of WAR
> > >
> > > I worked on deploying my first webapp to another server today.  I
> > > packaged it up as a war, transferred it to the other tomcat server,
> > > added the one line context element in the server.xml, and
> > restarted.
> > > Nothing - the logs said that the webapp that was referenced by the
> > > context statement was not available or in a readable
> > format.  In fact,
> > > the war did not expand into the file system.
> > >
> > > So, I removed the context element, and restarted.  With the context
> > > gone, the WAR expanded properly.  Then I added the context back in,
> > > and it worked fine.
> > >
> > > Is this normal?
> > >
> >
> > Depends on what you specified for the docBase parameter in
> > the Context element.  This needs to be the absolute or relative (to
> > $CATALINA_HOME/webapps) name of the WAR file.
> >
> > Craig
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:tomcat-user-> [EMAIL PROTECTED]>
> > For
> > additional commands,
> > e-mail: <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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

Reply via email to