Take the 2-minute tour ×

i have a Linux Machine, Apache server is running and i need to deploy my project which has developed on Windows machine.

Can someone give me bit idea how to do that?

Thanks in advance.

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

if you have FTP or SCP access to the directories where Tomcat is installed, you should be able to simply copy the generated WAR file to the tomcat/webapps directory. Tomcat will automatically deploy the war for you.

When redeploying, I find it safest to delete the original .WAR file in Tomcat, and tomcat will automatically destory the exploded directory for you. When that's done, copy up the .WAR file.

Finally, make sure you copy the .WAR file "all at once". If you have a slow upload, Tomcat will try and deploy the .WAR file even though it has not completely been uploaded yet. This will lead to a partial or unsuccessful deployment. It's best if you upload to a neutral directory (home directory, temp, whichever), and then either rename (using mv) the .WAR into tomcat, or simply copy it there using the local file systems copy command. Much faster than the upload. Safest way is to mv the file from the same filesystem.

All of this assumes you do not have any of the manager or admin ports open for Tomcat, as it provides mechanisms to remotely deploy applications directly.

But, in truth, simply removing the old app and slipping in the new app works simply and well for many applications.

share|improve this answer
tomcat.apache.org –  Rupok Jun 30 '11 at 5:46
Thanks Rupok !! –  user575363 Jun 30 '11 at 5:47
add comment

Your Answer

