tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mike jackson" <>
Subject RE: Installs/deploys to... why?
Date Wed, 16 Apr 2003 00:16:13 GMT
1) $TOMCAT_HOME/webapps/<war filename>

2) It is there, unless you have things setup strangely, and I'm not sure
that you can even override that anyway.  So it should be there.

3) I don't think it does, I think it scans the directory and looks for
them in the server.xml file (in $TOMCAT_HOME/conf) as well.

4) Typically (in my environment) you build in one place and install on a
test system.  Then you move to a production system.  So, what I do is
build on my laptop (and test).  Then when I think things are good I copy
the war file over to the test box.  Assuming no one finds things that
need to be fixed I can then copy the war file over to the production
system.  At no point do I do any changing of the files on the test or
production system.  All changes and debugging is on my laptop.  

(4 continued) So for me what the war file does is package all of the
files for the webapp into a something that I can copy to the server(s)
without having to worry about any changes.  Also the war file is a
"snapshot" of the system, so it is a nice secondary way to keep versions
of the webapp.  Hopefully you're using some kind of source
control/versioning system, so it's not critical to have a backup (in the
for of a war file), but it's nice none the less.

(4 continued, last time) I hope that made sense. 

mike jackson

> -----Original Message-----
> From: Karsten Wutzke []
> Sent: Tuesday, April 15, 2003 4:07 PM
> To: tomcat-user; Ant Users List
> Subject: Installs/deploys to... why?
> Hi all!
> I'm a Tomcat 4.1 newbie and have the following questions using the Ant
> tasks:
> 1. I'm using Ant to (deploy/)install my web app to a local Tomcat 4.1.
> Any time I do that, my web app gets installed in the context path
> /basketball, which is right. The index.html is found, so the install
> seems to work. However, on the local server, when looking for the
> that have been installed, I don't get where the web application files
> actually are!
> Anytime install or deploy succeeds, the directory called
> <tomcat-root>/work/Standalone/localhost/manager/basketball is created,
> however, *only* with the WEB-INF subdir recursively plus all the class
> files. No other types of files are there, no jsp's, no html's, no
> just servlets... But the strange thing works. The web app correctly
> shows the index.html. And it is not about the war file I created. It
> correct. It expands to the desired tree structure.
> What's going on? Where are the actual installed files, like the
> index.html shown?
> 2. Why isn't the web app in <tomcat-root>/webapps/basketball? Instead,
> some unknown place is used when having used install (see 1.).
> Additionally to the behavior desribed above, when using deploy
> of install), the web app war file is placed in
> <tomcat-root>/work/Standalone/localhost/manager/ .
> Anyway, in the Tomcat README at
> the work directory is supposed to be a "scratch directory for
> files". Why do both tasks, deploy *and* install go to this directory
> instead of <tomcat-root>/webapps/basketball? The deploy task really
> can't be considered "temporary"...
> 3. How does Tomcat remember web apps to be available/installed?
> I wonder where Tomcat holds web application info itself... If it is
> in the webapps dir, there must be some other place, but where?
> 4. What is the advantage of copying the web app war file to the server
> with deploy (which install doesn't)? Whenever continuing development,
> new war is created/needed anyway, the one on the server will be out of
> date anyway. Is it just used as some kind of backup? Or what else?
> Thanks for any help!
> Karsten
> Jacob Kjome wrote:
> >
> > Well, you are describing exactly what the "deploy" task is for.  If
> > are using this for development purposes, you should use the
> > task which doesn't persist the context after a Tomcat restart.
> > it just mounts the directory which is the root of your just built
> > as a running context in Tomcat.  It doesn't send any file anywhere
and a
> > simple stop of Tomcat or the "remove" task gets rid of all traces
> > your app was even running under Tomcat.  It is *much* more
> > for development purposes than "deploy/undeploy".
> >
> > Jake
> >
> > At 06:02 PM 4/15/2003 +0200, you wrote:
> >
> >> Hi all!
> >>
> >> Why do the Tomcat 4.1 Ant tasks deploy and install put the context
> >> directory to <tomcat-root>/work/Standalone/localhost/<context>,
> >> least on my machine? Anything misconfigured?
> >>
> >> <property name="local.manager.url"
> >> <property name="local.manager.username"
> >> <property name="local.manager.password"
> >>
> >> <property name=""         value="basketball"/>
> >> <property name="webapp.context.path" value="/${}"/>
> >>
> >> <target name="deploy-local" depends="dist,startup-local"
> >> description="Deploys the web app to local Tomcat.">
> >>
> >>   <deploy url="${local.manager.url}"
> >>           username="${local.manager.username}"
> >>           password="${local.manager.password}"
> >>           path="${webapp.context.path}"
> >>           war="file://${dist.file}"/>
> >> </target>
> >>
> >> Nothing unusual I'm using... The depends tasks work fine, they
> >> the war file which is to be distributed and startup-local starts up
> >> local Tomcat web server, if it hasn't been started yet.
> >>
> >> Can anyone help?
> >>
> >> Thanks!
> >> Karsten
> >>
> >>
> >>
> >> To unsubscribe, e-mail:
> >> For additional commands, e-mail:
> >
> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message