tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karsten Wutzke <kwut...@web.de>
Subject Installs/deploys to... why?
Date Wed, 16 Apr 2003 00:06:47 GMT
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 files 
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 jar's, 
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 is 
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 (instead 
of install), the web app war file is placed in 
<tomcat-root>/work/Standalone/localhost/manager/ .

Anyway, in the Tomcat README at 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/README.txt
the work directory is supposed to be a "scratch directory for temporary 
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 not 
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, a 
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 you 
> are using this for development purposes, you should use the "install" 
> task which doesn't persist the context after a Tomcat restart.  Instead, 
> it just mounts the directory which is the root of your just built webapp 
> 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 that 
> your app was even running under Tomcat.  It is *much* more convenient 
> 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>, at 
>> least on my machine? Anything misconfigured?
>>
>> <property name="local.manager.url" value="${local.root.url}/manager"/>
>> <property name="local.manager.username" value="${manager.username}"/>
>> <property name="local.manager.password" value="${manager.password}"/>
>>
>> <property name="webapp.name"         value="basketball"/>
>> <property name="webapp.context.path" value="/${webapp.name}"/>
>>
>> <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 create 
>> 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: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message