Re: Tomcat's Ant Tasks [Install]

2004-01-22 Thread Andrew Shirk
The trick is to use the deploy task rather than the install task, and 
include the context.xml (make sure it's named context.xml) in the META-INF 
directory inside the war file. Tomcat will find the context file, and add 
the contents to the server.xml file. Then, use redeploy to deploy changes, 
or undeploy to remove. Once you've got that all set up, it works remarkably 
well.

Andrew

At 04:22 PM 1/21/2004, Matt Raible wrote:
Is it possible to use the install ant task to deploy to a remote 
server?  I would think so, but it
seems that the Manager app of Tomcat tries to load the context file on 
the remote server...

install url=${tomcat.manager.url}
 username=${tomcat.username}
 password=${tomcat.password}
 config=file:${webapp.dist}/${webapp.name}.xml
 war=jar:file:${webapp.dist}/${webapp.war}!//
Is there anyway to do this, i.e. packaging the context.xml in the JAR and 
telling the manager app
to get it from there - or can I only deploy to localhost when I have a 
context.xml involved?

On another note, is it possible to put all the ant task definitions in a 
file that can be referenced
when - so all tasks can be declared at once.  Cactus does this and it's a 
handy feature.  I've
added it to my project by doing the following.

1.  Created a tomcatTasks.properties file with the following contents:

deploy=org.apache.catalina.ant.DeployTask
install=org.apache.catalina.ant.InstallTask
list=org.apache.catalina.ant.ListTask
reload=org.apache.catalina.ant.ReloadTask
remove=org.apache.catalina.ant.RemoveTask
resources=org.apache.catalina.ant.ResourcesTask
roles=org.apache.catalina.ant.RolesTask
start=org.apache.catalina.ant.StartTask
stop=org.apache.catalina.ant.StopTask
undeploy=org.apache.catalina.ant.UndeployTask
2.  Define my tasks using:

taskdef file=${ant-contrib.dir}/tomcatTasks.properties
classpath
pathelement path=${tomcat.home}/server/lib/catalina-ant.jar/
/classpath
/taskdef
This certainly cuts down on the size of my build.xml file by about 20 lines!

Thanks,

Matt

-
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]


RE: Tomcat's Ant Tasks [Install]

2004-01-22 Thread Robert D. Abernethy IV
Are you using Tomcat 4 or Tomcat 5?  For Tomcat 5, the deploy task works
great.  However, for Tomcat 4, I have found there is no perfect
solution.  The install task for Tomcat 4 is for installing web
applications found on the same server as Tomcat.  The deploy task for
Tomcat 4 is for installing web applications to a remote Tomcat server,
but it does not have a config parameter.  Therefore you cannot install
a web application remotely using a context file.

I have found the best method is to copy the WAR file and the context
file to the same server that Tomcat is running on and then use the
install task.

scp file=${web.home}/META-INF/context.xml

[EMAIL PROTECTED]:${catalina.home}/webapps/${a
pp.name}.xml
port=${scp.port}
password=${server.password}
trust=true/

scp file=${dist.home}/${app.name}-${app.version}.war

todir=[EMAIL PROTECTED]:${catalina.home}/webapps/${
app.name}.war
port=${scp.port}
password=${server.password}
trust=true/

install url=${manager.url}
username=${manager.username}
password=${manager.password}
path=${app.path}
config=file:${catalina.home}/webapps/${app.name}.xml
war=${app.name}.war/


Rob Abernethy
Dynamic Edge, Inc.

-Original Message-
From: Andrew Shirk [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 22, 2004 11:46 AM
To: [EMAIL PROTECTED]
Cc: Matt Raible
Subject: Re: Tomcat's Ant Tasks [Install]

The trick is to use the deploy task rather than the install task, and 
include the context.xml (make sure it's named context.xml) in the
META-INF 
directory inside the war file. Tomcat will find the context file, and
add 
the contents to the server.xml file. Then, use redeploy to deploy
changes, 
or undeploy to remove. Once you've got that all set up, it works
remarkably 
well.

Andrew

At 04:22 PM 1/21/2004, Matt Raible wrote:
Is it possible to use the install ant task to deploy to a remote 
server?  I would think so, but it
seems that the Manager app of Tomcat tries to load the context file
on 
the remote server...

 install url=${tomcat.manager.url}
  username=${tomcat.username}
  password=${tomcat.password}
  config=file:${webapp.dist}/${webapp.name}.xml
  war=jar:file:${webapp.dist}/${webapp.war}!//

Is there anyway to do this, i.e. packaging the context.xml in the JAR
and 
telling the manager app
to get it from there - or can I only deploy to localhost when I have a 
context.xml involved?

On another note, is it possible to put all the ant task definitions in
a 
file that can be referenced
when - so all tasks can be declared at once.  Cactus does this and it's
a 
handy feature.  I've
added it to my project by doing the following.

1.  Created a tomcatTasks.properties file with the following contents:

deploy=org.apache.catalina.ant.DeployTask
install=org.apache.catalina.ant.InstallTask
list=org.apache.catalina.ant.ListTask
reload=org.apache.catalina.ant.ReloadTask
remove=org.apache.catalina.ant.RemoveTask
resources=org.apache.catalina.ant.ResourcesTask
roles=org.apache.catalina.ant.RolesTask
start=org.apache.catalina.ant.StartTask
stop=org.apache.catalina.ant.StopTask
undeploy=org.apache.catalina.ant.UndeployTask

2.  Define my tasks using:

 taskdef file=${ant-contrib.dir}/tomcatTasks.properties
 classpath
 pathelement
path=${tomcat.home}/server/lib/catalina-ant.jar/
 /classpath
 /taskdef

This certainly cuts down on the size of my build.xml file by about 20
lines!

Thanks,

Matt

-
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]



Re: Tomcat's Ant Tasks [Install]

2004-01-22 Thread Matt Raible
I'm guessing this is a Tomcat 5 thing?  I tried the context.xml (in my war's META-INF 
directory) thing in Tomcat 4.1.29 and it didn't work, but maybe I need to use Tomcat's 
Ant task 
for this to work?

Also, it is possible to use Tomcat 5's catalina-ant.jar to deploy to Tomcat 4's 
manager app - or 
are the tasks and manager app tightly coupled?  In other words, are the tasks better 
in 5 or both 
the tasks and the manager app?

Thanks,

Matt

 The trick is to use the deploy task rather than the install task,
  and include the context.xml (make sure it's named context.xml) in 
 the META-INF directory inside the war file. Tomcat will find the 
 context file, and add the contents to the server.xml file. Then, use 
 redeploy to deploy changes, or undeploy to remove. Once you've got 
 that all set up, it works remarkably well.
 
 Andrew
 
 At 04:22 PM 1/21/2004, Matt Raible wrote:
 Is it possible to use the install ant task to deploy to a remote 
 server?  I would think so, but it
 seems that the Manager app of Tomcat tries to load the context file on 
 the remote server...
 
  install url=${tomcat.manager.url}
   username=${tomcat.username}
   password=${tomcat.password}
   config=file:${webapp.dist}/${webapp.name}.xml
   war=jar:file:${webapp.dist}/${webapp.war}!//
 
 Is there anyway to do this, i.e. packaging the context.xml in the JAR and 
 telling the manager app
 to get it from there - or can I only deploy to localhost when I have a 
 context.xml involved?
 
 On another note, is it possible to put all the ant task definitions in a 
 file that can be referenced
 when - so all tasks can be declared at once.  Cactus does this and it's a 
 handy feature.  I've
 added it to my project by doing the following.
 
 1.  Created a tomcatTasks.properties file with the following contents:
 
 deploy=org.apache.catalina.ant.DeployTask
 install=org.apache.catalina.ant.InstallTask
 list=org.apache.catalina.ant.ListTask
 reload=org.apache.catalina.ant.ReloadTask
 remove=org.apache.catalina.ant.RemoveTask
 resources=org.apache.catalina.ant.ResourcesTask
 roles=org.apache.catalina.ant.RolesTask
 start=org.apache.catalina.ant.StartTask
 stop=org.apache.catalina.ant.StopTask
 undeploy=org.apache.catalina.ant.UndeployTask
 
 2.  Define my tasks using:
 
  taskdef file=${ant-contrib.dir}/tomcatTasks.properties
  classpath
  pathelement path=${tomcat.home}/server/lib/catalina-ant.jar/
  /classpath
  /taskdef
 
 This certainly cuts down on the size of my build.xml file by about 20 lines!
 
 Thanks,
 
 Matt
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


--
Open WebMail Project (http://openwebmail.org)

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



Re: Tomcat's Ant Tasks [Install]

2004-01-22 Thread Andrew Shirk
At 01:16 PM 1/22/2004, you wrote:
I'm guessing this is a Tomcat 5 thing?  I tried the context.xml (in my 
war's META-INF
directory) thing in Tomcat 4.1.29 and it didn't work, but maybe I need to 
use Tomcat's Ant task
for this to work?
Yes, you need to use the Ant task (deploy). I use it daily with 4.1.29.

Also, it is possible to use Tomcat 5's catalina-ant.jar to deploy to 
Tomcat 4's manager app - or
are the tasks and manager app tightly coupled?  In other words, are the 
tasks better in 5 or both
the tasks and the manager app?
The tasks are part of the catalina api and thus I believe are tightly 
coupled. Although I do not yet use Tomcat 5, my understanding is both the 
tasks and the manager app are better. Use the tasks that came with the 
version of Tomcat you're deploying to. The install and remove tasks, for 
example, have been deprecated in 5.

Thanks,

Matt

 The trick is to use the deploy task rather than the install task,
  and include the context.xml (make sure it's named context.xml) in
 the META-INF directory inside the war file. Tomcat will find the
 context file, and add the contents to the server.xml file. Then, use
 redeploy to deploy changes, or undeploy to remove. Once you've got
 that all set up, it works remarkably well.

 Andrew

 At 04:22 PM 1/21/2004, Matt Raible wrote:
 Is it possible to use the install ant task to deploy to a remote
 server?  I would think so, but it
 seems that the Manager app of Tomcat tries to load the context file on
 the remote server...
 
  install url=${tomcat.manager.url}
   username=${tomcat.username}
   password=${tomcat.password}
   config=file:${webapp.dist}/${webapp.name}.xml
   war=jar:file:${webapp.dist}/${webapp.war}!//
 
 Is there anyway to do this, i.e. packaging the context.xml in the JAR and
 telling the manager app
 to get it from there - or can I only deploy to localhost when I have a
 context.xml involved?
 
 On another note, is it possible to put all the ant task definitions in a
 file that can be referenced
 when - so all tasks can be declared at once.  Cactus does this and it's a
 handy feature.  I've
 added it to my project by doing the following.
 
 1.  Created a tomcatTasks.properties file with the following contents:
 
 deploy=org.apache.catalina.ant.DeployTask
 install=org.apache.catalina.ant.InstallTask
 list=org.apache.catalina.ant.ListTask
 reload=org.apache.catalina.ant.ReloadTask
 remove=org.apache.catalina.ant.RemoveTask
 resources=org.apache.catalina.ant.ResourcesTask
 roles=org.apache.catalina.ant.RolesTask
 start=org.apache.catalina.ant.StartTask
 stop=org.apache.catalina.ant.StopTask
 undeploy=org.apache.catalina.ant.UndeployTask
 
 2.  Define my tasks using:
 
  taskdef file=${ant-contrib.dir}/tomcatTasks.properties
  classpath
  pathelement 
path=${tomcat.home}/server/lib/catalina-ant.jar/
  /classpath
  /taskdef
 
 This certainly cuts down on the size of my build.xml file by about 20 
lines!
 
 Thanks,
 
 Matt
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

--
Open WebMail Project (http://openwebmail.org)
-
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]


RE: Tomcat's Ant Tasks [Install]

2004-01-22 Thread Andrew Shirk
At 12:47 PM 1/22/2004, you wrote:
Are you using Tomcat 4 or Tomcat 5?  For Tomcat 5, the deploy task works
great.  However, for Tomcat 4, I have found there is no perfect
solution.  The install task for Tomcat 4 is for installing web
applications found on the same server as Tomcat.  The deploy task for
Tomcat 4 is for installing web applications to a remote Tomcat server,
but it does not have a config parameter.  Therefore you cannot install
a web application remotely using a context file.
Sure you can. Just put in META-INF and use the deploy task.

I have found the best method is to copy the WAR file and the context
file to the same server that Tomcat is running on and then use the
install task.
scp file=${web.home}/META-INF/context.xml

[EMAIL PROTECTED]:${catalina.home}/webapps/${a
pp.name}.xml
port=${scp.port}
password=${server.password}
trust=true/
scp file=${dist.home}/${app.name}-${app.version}.war

todir=[EMAIL PROTECTED]:${catalina.home}/webapps/${
app.name}.war
port=${scp.port}
password=${server.password}
trust=true/
install url=${manager.url}
username=${manager.username}
password=${manager.password}
path=${app.path}
config=file:${catalina.home}/webapps/${app.name}.xml
war=${app.name}.war/
Rob Abernethy
Dynamic Edge, Inc.


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


RE: Tomcat's Ant Tasks [Install] - SOLVED!

2004-01-22 Thread Matt Raible
 At 12:47 PM 1/22/2004, you wrote:
 Are you using Tomcat 4 or Tomcat 5?  For Tomcat 5, the deploy task works
 great.  However, for Tomcat 4, I have found there is no perfect
 solution.  The install task for Tomcat 4 is for installing web
 applications found on the same server as Tomcat.  The deploy task for
 Tomcat 4 is for installing web applications to a remote Tomcat server,
 but it does not have a config parameter.  Therefore you cannot install
 a web application remotely using a context file.
 
 Sure you can. Just put in META-INF and use the deploy task.
 

WOW - that worked!  VERY fricken cool - thanks for the help!

Matt

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



RE: Tomcat's Ant Tasks [Install]

2004-01-22 Thread Robert D. Abernethy IV
What does the name of the context file have to be?  The Tomcat 5 deploy
task is automatically looking for META-INF/context.xml.  Will this
name work?  Or does the file need the same name as the context?

Rob Abernethy
Dynamic Edge, Inc.

-Original Message-
From: Andrew Shirk [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 22, 2004 3:22 PM
To: Tomcat Users List
Cc: Robert D. Abernethy IV
Subject: RE: Tomcat's Ant Tasks [Install]
Importance: Low

At 12:47 PM 1/22/2004, you wrote:
Are you using Tomcat 4 or Tomcat 5?  For Tomcat 5, the deploy task
works
great.  However, for Tomcat 4, I have found there is no perfect
solution.  The install task for Tomcat 4 is for installing web
applications found on the same server as Tomcat.  The deploy task for
Tomcat 4 is for installing web applications to a remote Tomcat server,
but it does not have a config parameter.  Therefore you cannot
install
a web application remotely using a context file.

Sure you can. Just put in META-INF and use the deploy task.

I have found the best method is to copy the WAR file and the context
file to the same server that Tomcat is running on and then use the
install task.

scp file=${web.home}/META-INF/context.xml

[EMAIL PROTECTED]:${catalina.home}/webapps/${
a
pp.name}.xml
 port=${scp.port}
 password=${server.password}
 trust=true/

scp file=${dist.home}/${app.name}-${app.version}.war

todir=[EMAIL PROTECTED]:${catalina.home}/webapps/$
{
app.name}.war
 port=${scp.port}
 password=${server.password}
 trust=true/

install url=${manager.url}
 username=${manager.username}
 password=${manager.password}
 path=${app.path}
 config=file:${catalina.home}/webapps/${app.name}.xml
 war=${app.name}.war/


Rob Abernethy
Dynamic Edge, Inc.


-
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]



Re: Tomcat's Ant Tasks [Install]

2004-01-22 Thread Remy Maucherat
Robert D. Abernethy IV wrote:
What does the name of the context file have to be?  The Tomcat 5 deploy
task is automatically looking for META-INF/context.xml.  Will this
name work?  Or does the file need the same name as the context?
No, it's context.xml always. It will then be copied (and renamed) to 
conf/[enginename]/[hostname]/[contextname].xml
If you undeploy your context, it will be removed as well.

Tomcat will look for META-INF/context.xml when deploying all webapps 
(including, for example, if you drop a .war in webapps), so this is a 
lot more consistent than before. I think in Tomcat 4 it worked only with 
the deploy task.

--
x
Rémy Maucherat
Senior Developer  Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Tomcat's Ant Tasks [Install]

2004-01-22 Thread Andrew Shirk
The context file has to be named context.xml.

At 03:54 PM 1/22/2004, you wrote:
What does the name of the context file have to be?  The Tomcat 5 deploy
task is automatically looking for META-INF/context.xml.  Will this
name work?  Or does the file need the same name as the context?
Rob Abernethy
Dynamic Edge, Inc.
-Original Message-
From: Andrew Shirk [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 22, 2004 3:22 PM
To: Tomcat Users List
Cc: Robert D. Abernethy IV
Subject: RE: Tomcat's Ant Tasks [Install]
Importance: Low
At 12:47 PM 1/22/2004, you wrote:
Are you using Tomcat 4 or Tomcat 5?  For Tomcat 5, the deploy task
works
great.  However, for Tomcat 4, I have found there is no perfect
solution.  The install task for Tomcat 4 is for installing web
applications found on the same server as Tomcat.  The deploy task for
Tomcat 4 is for installing web applications to a remote Tomcat server,
but it does not have a config parameter.  Therefore you cannot
install
a web application remotely using a context file.
Sure you can. Just put in META-INF and use the deploy task.

I have found the best method is to copy the WAR file and the context
file to the same server that Tomcat is running on and then use the
install task.

scp file=${web.home}/META-INF/context.xml

[EMAIL PROTECTED]:${catalina.home}/webapps/${
a
pp.name}.xml
 port=${scp.port}
 password=${server.password}
 trust=true/

scp file=${dist.home}/${app.name}-${app.version}.war

todir=[EMAIL PROTECTED]:${catalina.home}/webapps/$
{
app.name}.war
 port=${scp.port}
 password=${server.password}
 trust=true/

install url=${manager.url}
 username=${manager.username}
 password=${manager.password}
 path=${app.path}
 config=file:${catalina.home}/webapps/${app.name}.xml
 war=${app.name}.war/


Rob Abernethy
Dynamic Edge, Inc.
-
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]


Tomcat's Ant Tasks [Install]

2004-01-21 Thread Matt Raible
Is it possible to use the install ant task to deploy to a remote server?  I would 
think so, but it 
seems that the Manager app of Tomcat tries to load the context file on the remote 
server...

install url=${tomcat.manager.url}
 username=${tomcat.username}
 password=${tomcat.password}
 config=file:${webapp.dist}/${webapp.name}.xml
 war=jar:file:${webapp.dist}/${webapp.war}!//

Is there anyway to do this, i.e. packaging the context.xml in the JAR and telling the 
manager app 
to get it from there - or can I only deploy to localhost when I have a context.xml 
involved?

On another note, is it possible to put all the ant task definitions in a file that can 
be referenced 
when - so all tasks can be declared at once.  Cactus does this and it's a handy 
feature.  I've 
added it to my project by doing the following.

1.  Created a tomcatTasks.properties file with the following contents:

deploy=org.apache.catalina.ant.DeployTask
install=org.apache.catalina.ant.InstallTask
list=org.apache.catalina.ant.ListTask
reload=org.apache.catalina.ant.ReloadTask
remove=org.apache.catalina.ant.RemoveTask
resources=org.apache.catalina.ant.ResourcesTask
roles=org.apache.catalina.ant.RolesTask
start=org.apache.catalina.ant.StartTask
stop=org.apache.catalina.ant.StopTask
undeploy=org.apache.catalina.ant.UndeployTask

2.  Define my tasks using:

taskdef file=${ant-contrib.dir}/tomcatTasks.properties
classpath
pathelement path=${tomcat.home}/server/lib/catalina-ant.jar/
/classpath
/taskdef

This certainly cuts down on the size of my build.xml file by about 20 lines!

Thanks,

Matt

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



RE: Tomcat's Ant Tasks

2003-06-25 Thread Phillip Qin
As I said in my previous post, I gave up using tomcat ant task to deploy my
app on production box due to the difficulty of granting permission to war.
If you don't start tomcat -security, catalina ant tasks are still the
easiest way to go.

My lesson learnt from using Catalina tasks is, most of the errors are caused
by wrong path= and/or war=. Following suggestions are based on linux

- install: 

path=${your.app.path}
war=file:/${your.unpacked.dir.containing.your.webapp} or
war=jar:file:/${your.dir.containing.war}/${your.war}!/

- remove: only works if you've installed before

path=${your.app.path}

- reload

path=${your.app.path}

Other comments:

Theoretically, correct me if I am wrong, if I install my webapp from my
local dev box to remote server, install task will lock your local dir as
in-use on win32 box.

-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED] 
Sent: June 24, 2003 6:19 PM
To: '[EMAIL PROTECTED]'
Subject: Tomcat's Ant Tasks

I'm having trouble using Tomcat's Ant Tasks.  I've written up a wiki page on
how I'm using them and the problems I'm experiencing.  Any help is
appreciated.

http://raibledesigns.com/wiki/Wiki.jsp?page=TomcatAntTasks

Thanks,

Matt

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


Re: Tomcat's Ant Tasks

2003-06-25 Thread Tim Shaw
Personally, I use deploy/undeploy, even during development - saves 
worrying about copying files around and mapping network drives etc 
(apart from anything, I run load-tests automatically on both W2K and 
Linux servers, scripted from Ant). This is the way I work remotely/in 
production, and it's not a big overhead ... although I'd like to see 
recommendations as to size/whatever where performance difference became 
'significant' [5 secs?]. For development I just have a local 
TC/MySQL/... setup - the only thing I ever need to change is the server 
hostname.

Anyone think a comment on the plus/minus of the approaches worth 
following up?

Thanks

tim

Phillip Qin wrote:
As I said in my previous post, I gave up using tomcat ant task to deploy my
app on production box due to the difficulty of granting permission to war.
If you don't start tomcat -security, catalina ant tasks are still the
easiest way to go.
My lesson learnt from using Catalina tasks is, most of the errors are caused
by wrong path= and/or war=. Following suggestions are based on linux
- install: 

path=${your.app.path}
war=file:/${your.unpacked.dir.containing.your.webapp} or
war=jar:file:/${your.dir.containing.war}/${your.war}!/
- remove: only works if you've installed before

path=${your.app.path}

- reload

path=${your.app.path}

Other comments:

Theoretically, correct me if I am wrong, if I install my webapp from my
local dev box to remote server, install task will lock your local dir as
in-use on win32 box.
-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED] 
Sent: June 24, 2003 6:19 PM
To: '[EMAIL PROTECTED]'
Subject: Tomcat's Ant Tasks

I'm having trouble using Tomcat's Ant Tasks.  I've written up a wiki page on
how I'm using them and the problems I'm experiencing.  Any help is
appreciated.
http://raibledesigns.com/wiki/Wiki.jsp?page=TomcatAntTasks

Thanks,

Matt

-
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]


RE: Tomcat's Ant Tasks

2003-06-25 Thread Phillip Qin
Do you use Tomcat? Do you start Tomcat with -security?

-Original Message-
From: Tim Shaw [mailto:[EMAIL PROTECTED] 
Sent: June 25, 2003 11:34 AM
To: Tomcat Users List
Subject: Re: Tomcat's Ant Tasks

Personally, I use deploy/undeploy, even during development - saves 
worrying about copying files around and mapping network drives etc 
(apart from anything, I run load-tests automatically on both W2K and 
Linux servers, scripted from Ant). This is the way I work remotely/in 
production, and it's not a big overhead ... although I'd like to see 
recommendations as to size/whatever where performance difference became 
'significant' [5 secs?]. For development I just have a local 
TC/MySQL/... setup - the only thing I ever need to change is the server 
hostname.

Anyone think a comment on the plus/minus of the approaches worth 
following up?

Thanks

tim

Phillip Qin wrote:
 As I said in my previous post, I gave up using tomcat ant task to deploy
my
 app on production box due to the difficulty of granting permission to war.
 If you don't start tomcat -security, catalina ant tasks are still the
 easiest way to go.
 
 My lesson learnt from using Catalina tasks is, most of the errors are
caused
 by wrong path= and/or war=. Following suggestions are based on linux
 
 - install: 
 
 path=${your.app.path}
 war=file:/${your.unpacked.dir.containing.your.webapp} or
 war=jar:file:/${your.dir.containing.war}/${your.war}!/
 
 - remove: only works if you've installed before
 
 path=${your.app.path}
 
 - reload
 
 path=${your.app.path}
 
 Other comments:
 
 Theoretically, correct me if I am wrong, if I install my webapp from my
 local dev box to remote server, install task will lock your local dir as
 in-use on win32 box.
 
 -Original Message-
 From: Raible, Matt [mailto:[EMAIL PROTECTED] 
 Sent: June 24, 2003 6:19 PM
 To: '[EMAIL PROTECTED]'
 Subject: Tomcat's Ant Tasks
 
 I'm having trouble using Tomcat's Ant Tasks.  I've written up a wiki page
on
 how I'm using them and the problems I'm experiencing.  Any help is
 appreciated.
 
 http://raibledesigns.com/wiki/Wiki.jsp?page=TomcatAntTasks
 
 Thanks,
 
 Matt
 
 -
 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]


Re: Tomcat's Ant Tasks

2003-06-25 Thread Tim Shaw
I haven't used the -security - access is by trusted souls (and 
developers :-) on a closed network. I would tend to treat this as 
othogonal to the development anyway, much as DB access and configuration 
is within the J2EE environments.

I see install etc are deprecated in favour of deploy/undeploy in TC5, so 
I guess I found the right route ...

Phillip Qin wrote:
Do you use Tomcat? Do you start Tomcat with -security?

-Original Message-
From: Tim Shaw [mailto:[EMAIL PROTECTED] 
Sent: June 25, 2003 11:34 AM
To: Tomcat Users List
Subject: Re: Tomcat's Ant Tasks

Personally, I use deploy/undeploy, even during development - saves 
worrying about copying files around and mapping network drives etc 
(apart from anything, I run load-tests automatically on both W2K and 
Linux servers, scripted from Ant). This is the way I work remotely/in 
production, and it's not a big overhead ... although I'd like to see 
recommendations as to size/whatever where performance difference became 
'significant' [5 secs?]. For development I just have a local 
TC/MySQL/... setup - the only thing I ever need to change is the server 
hostname.

Anyone think a comment on the plus/minus of the approaches worth 
following up?

Thanks

tim

Phillip Qin wrote:

As I said in my previous post, I gave up using tomcat ant task to deploy
my

app on production box due to the difficulty of granting permission to war.
If you don't start tomcat -security, catalina ant tasks are still the
easiest way to go.
My lesson learnt from using Catalina tasks is, most of the errors are
caused

by wrong path= and/or war=. Following suggestions are based on linux

- install: 

path=${your.app.path}
war=file:/${your.unpacked.dir.containing.your.webapp} or
war=jar:file:/${your.dir.containing.war}/${your.war}!/
- remove: only works if you've installed before

path=${your.app.path}

- reload

path=${your.app.path}

Other comments:

Theoretically, correct me if I am wrong, if I install my webapp from my
local dev box to remote server, install task will lock your local dir as
in-use on win32 box.
-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED] 
Sent: June 24, 2003 6:19 PM
To: '[EMAIL PROTECTED]'
Subject: Tomcat's Ant Tasks

I'm having trouble using Tomcat's Ant Tasks.  I've written up a wiki page
on

how I'm using them and the problems I'm experiencing.  Any help is
appreciated.
http://raibledesigns.com/wiki/Wiki.jsp?page=TomcatAntTasks

Thanks,

Matt

-
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]


RE: Tomcat's Ant Tasks

2003-06-25 Thread Phillip Qin
The fact is grant codeBase doesn't accept war file.

For example, I use Java Security Manager and want to allow ONLY webapp_1
write to /home/data. If I take unpacked dir approach, I would 

grant codeBase file:${Catalina.home}/webapps/webapp_1/- {
  permission java.io.FilePermission /home/data/*,read,write;
};

But with java security manager, I will be forced to grant read/write to all
the webapps

grant {
 Permission..;
};

So IMHO war only works for non-secured applications.

-Original Message-
From: Tim Shaw [mailto:[EMAIL PROTECTED] 
Sent: June 25, 2003 2:28 PM
To: Tomcat Users List
Subject: Re: Tomcat's Ant Tasks

I haven't used the -security - access is by trusted souls (and 
developers :-) on a closed network. I would tend to treat this as 
othogonal to the development anyway, much as DB access and configuration 
is within the J2EE environments.

I see install etc are deprecated in favour of deploy/undeploy in TC5, so 
I guess I found the right route ...

Phillip Qin wrote:
 Do you use Tomcat? Do you start Tomcat with -security?
 
 -Original Message-
 From: Tim Shaw [mailto:[EMAIL PROTECTED] 
 Sent: June 25, 2003 11:34 AM
 To: Tomcat Users List
 Subject: Re: Tomcat's Ant Tasks
 
 Personally, I use deploy/undeploy, even during development - saves 
 worrying about copying files around and mapping network drives etc 
 (apart from anything, I run load-tests automatically on both W2K and 
 Linux servers, scripted from Ant). This is the way I work remotely/in 
 production, and it's not a big overhead ... although I'd like to see 
 recommendations as to size/whatever where performance difference became 
 'significant' [5 secs?]. For development I just have a local 
 TC/MySQL/... setup - the only thing I ever need to change is the server 
 hostname.
 
 Anyone think a comment on the plus/minus of the approaches worth 
 following up?
 
 Thanks
 
 tim
 
 Phillip Qin wrote:
 
As I said in my previous post, I gave up using tomcat ant task to deploy
 
 my
 
app on production box due to the difficulty of granting permission to war.
If you don't start tomcat -security, catalina ant tasks are still the
easiest way to go.

My lesson learnt from using Catalina tasks is, most of the errors are
 
 caused
 
by wrong path= and/or war=. Following suggestions are based on linux

- install: 

path=${your.app.path}
war=file:/${your.unpacked.dir.containing.your.webapp} or
war=jar:file:/${your.dir.containing.war}/${your.war}!/

- remove: only works if you've installed before

path=${your.app.path}

- reload

path=${your.app.path}

Other comments:

Theoretically, correct me if I am wrong, if I install my webapp from my
local dev box to remote server, install task will lock your local dir as
in-use on win32 box.

-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED] 
Sent: June 24, 2003 6:19 PM
To: '[EMAIL PROTECTED]'
Subject: Tomcat's Ant Tasks

I'm having trouble using Tomcat's Ant Tasks.  I've written up a wiki page
 
 on
 
how I'm using them and the problems I'm experiencing.  Any help is
appreciated.

http://raibledesigns.com/wiki/Wiki.jsp?page=TomcatAntTasks

Thanks,

Matt

-
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]


Tomcat's Ant Tasks

2003-06-24 Thread Raible, Matt
I'm having trouble using Tomcat's Ant Tasks.  I've written up a wiki page on
how I'm using them and the problems I'm experiencing.  Any help is
appreciated.

http://raibledesigns.com/wiki/Wiki.jsp?page=TomcatAntTasks

Thanks,

Matt

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



Re: Tomcat's Ant Tasks

2003-06-24 Thread Yoav Shapira
Howdy,
I don't particularly feel like download Appfuse and contributing patches to it
at the momeny -- no spare bandwidth ;(  However, a few comments on your wiki
page:

- If you have something that's working and are happy with, there's no need to
change to these ant tasks.

- Reload is not pointless, you don't have to do a deploy anyways if you want to
just reload an existing webapp (useful if you've changed, for example,
configuration files).

- The build.xml in the tomcat App Developer's guide contains task definitions
for these tasks, so you didn't have to write your own ;)

- I don't know why you're getting the JDBC driver null message, but I think
I've seen that before: searching the tomcat-user archives might help.

- I don't know why you're getting the IOException, and I don't think I've seen
it before, so I'd be curious if it's particular to your app, e.g. if something
in your app calls getRealPath() on startup or shutdown.

The Ant tasks are just another way to do things: some people find it
convenient.  I use them some times, when I feel like it.  I think Craig
McClanahan once mentioned he uses them exclusively now, hardly ever actually
restarting his tomcat instance.

Yoav Shapira

--- Raible, Matt [EMAIL PROTECTED] wrote:
 I'm having trouble using Tomcat's Ant Tasks.  I've written up a wiki page on
 how I'm using them and the problems I'm experiencing.  Any help is
 appreciated.
 
 http://raibledesigns.com/wiki/Wiki.jsp?page=TomcatAntTasks
 
 Thanks,
 
 Matt
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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