| Author |
Problem with deploying a war file on tomcat
|
Apu Shah
Greenhorn
Joined: Aug 15, 2004
Posts: 8
|
|
Hi, I am trying to deploy a (applet-servlet) war file on tomcat using the ant script. This script runs fine and the deployment is done properly if run from my deployment managers pc. He is using ant 1.5 and jdk 1.4.2_01. I use 1.6 and jdk 1.4.2_04. Every thing is fine but somehow tomcat still runs the old war, eventhough my new war is ftp-ed to the webapps directory. Please help. thanks. aparna.
|
 |
Bear Bibeault
Author and opinionated walrus
Marshal
Joined: Jan 10, 2002
Posts: 50677
|
|
"Meenu", We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it. In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Thanks! bear Forum Bartender
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
|
|
(I'm thinking that this might be more a Tomcat problem, than anything to do with Ant. Let's see if we can track things down...) What does the Ant script look like that you're using to deploy the WAR on Tomcat? Are you using the Tomcat management API?
|
[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
|
 |
Apu Shah
Greenhorn
Joined: Aug 15, 2004
Posts: 8
|
|
Hi, The ant script executes shutdown.sh and startup.sh to stop and start the tomcat. It ftp's the new war file to the proper location in webapps directory. But some how is still executing the war file. Following is the part of the ant script : <target name="deploy" depends="mywar"> - <telnet userid="user" password="pwd" server="myserver.com"> <read>#</read> <write>su - adm</write> <read>Password:</read> <write>password</write> <read>Which Environment?</read> <write>${env}</write> <read>#</read> <write>shutdown.sh</write> <read>#</read> - <!-- rollback --> <write>cp /MYAPP /${env}/tomcat/webapps/myapp.war /MYAPP/${env}/webapp/rollback</write> <read>#</read> - <!-- del old exploded app directory --> <write>rm -Rf /MYAPP/${env}/tomcat/webapps/myapp</write> </telnet> - <ftp server="myserver.com" userid="adm" password="password" remotedir="/MYAPP/${env}/tomcat/webapps"> - <fileset dir="."> <include name="myapp.war" /> </fileset> </ftp> - <telnet userid="user" password="pwd" server="myserver.com"> <read>#</read> <write>su - appsadm</write> <read>Password:</read> <write>password</write> <read>Which Environment?</read> <write>${env}</write> <read>#</read> <write>startup.sh</write> <read>#</read> <write>tail -f /MYAPP/${env}/tomcat/logs/stdout.log</write> <read>EmbededTomcat: Startup time</read> </telnet> </target> - <target name="tdeploy"> - <antcall target="deploy"> <param name="env" value="test" /> </antcall> </target> thanks
|
 |
 |
|
|
subject: Problem with deploying a war file on tomcat
|
|
|