| Author |
Advice on deploying WAR file
|
Andy Hahn
Ranch Hand
Joined: Aug 31, 2004
Posts: 225
|
|
Hi, I am wondering if someone could provide advice on the correct way to re-deploy a WAR file to Tomcat. I am running version 4.1.31. Currently to deploy a WAR file I simply copy the WAR file to the <TOMCAT_HOME>\webApps directory. Then when I startup Tomcat the WAR file gets exploded. This all seems to work fine. But how about if I want to re-deploy a new version of the WAR file? Do I have to delete the WAR file from <TOMCAT_HOME>\webApps AND from <TOMCAT_HOME>\webApps\<context_name>? Or do I just overwrite the WAR file in <TOMCAT_HOME>\webApps? I have had some problems on startup in the past when I directly deleted the actual application context folder - <TOMCAT_HOME>\webApps\<context_name>. Thanks!
|
 |
Craig Jackson
Ranch Hand
Joined: Mar 19, 2002
Posts: 405
|
|
Yes, you can go thru the motions of deleting the old war file and the directory that was created. Of course you will have to shutdown/restart TOMCAT everytime that is done. I usually just use the manager status web interface to redeploy the application after I place the new WAR file in the ../webapps directory.
|
 |
Andy Hahn
Ranch Hand
Joined: Aug 31, 2004
Posts: 225
|
|
I would like to go the route of deleting the WAR file and restarting Tomcat (however I will check out the manager status web interface for my home projects!). The problem I am having occurs when I delete the <TOMCAT_HOME>\webApps\<context_name> directory. Tomcat throws exceptions and will not start when I do this. I have found that this is because that application's context information is added to server.xml. Also, the application context is copied to <TOMCAT_HOME>\work\Standalone\localhost\<context_name>. So with all of that said, would it be ok to simply delete the WAR file from <TOMCAT_HOME>\webApps and leave <TOMCAT_HOME>\webApps\<context_name> undeleted?
|
 |
 |
|
|
subject: Advice on deploying WAR file
|
|
|