You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Karsten Wutzke <kw...@web.de> on 2003/04/16 02:06:47 UTC
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 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
Re: Installs/deploys to... why?
Posted by Nikolaus Schmitt <n....@scaet.de>.
Hi Karsten,
check the tomcat 4.1.x documentation for the following expression (excerpt
from tomcat's default "server.xml"):
------------------
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">
---------------------
Note the attribute "unpackWARs" - it will explain what You're asking for.
regards
niko
----- Original Message -----
From: "Karsten Wutzke" <kw...@web.de>
To: "tomcat-user" <to...@jakarta.apache.org>; "Ant Users List"
<us...@ant.apache.org>
Sent: Wednesday, April 16, 2003 2:06 AM
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 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: 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
Re: Installs/deploys to... why?
Posted by Nikolaus Schmitt <n....@scaet.de>.
Hi Karsten,
check the tomcat 4.1.x documentation for the following expression (excerpt
from tomcat's default "server.xml"):
------------------
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">
---------------------
Note the attribute "unpackWARs" - it will explain what You're asking for.
regards
niko
----- Original Message -----
From: "Karsten Wutzke" <kw...@web.de>
To: "tomcat-user" <to...@jakarta.apache.org>; "Ant Users List"
<us...@ant.apache.org>
Sent: Wednesday, April 16, 2003 2:06 AM
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 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: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: Installs/deploys to... why?
Posted by mike jackson <mj...@cdi-hq.com>.
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.
--mikej
-=------
mike jackson
mjackson@cdi-hq.com
> -----Original Message-----
> From: Karsten Wutzke [mailto:kwutzke@web.de]
> 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
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
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: how set up the tomcat environemnt variable on Windows
Posted by Rosdi bin Kasim <ro...@epantai.com.my>.
Set it in Env Variables, and the quotes are not necessary.
Rosdi.
----- Original Message -----
From: "Narayana Reddy" <nr...@cisco.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Cc: "tomcat-user" <to...@jakarta.apache.org>; "Ant Users List"
<us...@ant.apache.org>
Sent: Wednesday, April 16, 2003 10:15 AM
Subject: how set up the tomcat environemnt variable on Windows
> Hi Folks
>
> I need to set the following ENV variable on windows for tomcat
>
> JSPC_OPTS='-J-Xms128m -J-Xmx256m'
>
> I am setting up in startup.bat and also in
> controlPanel-->System-->Advanced/Env Variables
>
> But i am not sure if I should Give the parameters with in the Single
Quotes
> or not. Also Tomcat runs on the Systems as Service and it is pointing to
> tomcat.exe instead of tomcat.bat.
>
> So not Sure if these Env. Variables are effective on the System or not.
>
> Obviuosly I am quite ignorant about Windows Environemnt. Any help is
> greatly appreciated.
>
> Thanks
> Narayan
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
how set up the tomcat environemnt variable on Windows
Posted by Narayana Reddy <nr...@cisco.com>.
Hi Folks
I need to set the following ENV variable on windows for tomcat
JSPC_OPTS='-J-Xms128m -J-Xmx256m'
I am setting up in startup.bat and also in
controlPanel-->System-->Advanced/Env Variables
But i am not sure if I should Give the parameters with in the Single Quotes
or not. Also Tomcat runs on the Systems as Service and it is pointing to
tomcat.exe instead of tomcat.bat.
So not Sure if these Env. Variables are effective on the System or not.
Obviuosly I am quite ignorant about Windows Environemnt. Any help is
greatly appreciated.
Thanks
Narayan