Search code examples
javatomcatdeploymenttomcat6

How to deploy war files to tomcat manually?


I have a war at location "C:\Documents and Settings\myProj.war".

The web project is also available at "C:\Documents and Settings\myProj".

I want to deploy this to one tomcat.

location of the tomcat is "C:\Documents and Settings\tomcat6x".

Please tell me how to do this manually or through command prompt.

One application is already running in Tomcat. It is a maven project. I want to deploy another application on same tomcat which is not maven application.


Solution

  • These are the steps I follow when I have to manually deploy a war in Tomcat on localhost:

    1. If Tomcat is running, stop/kill it.

    2. Go to the tomcat installation folder (this must be C:\Documents and Settings\tomcat6x for you), let's call it <tomcat>.

    3. In <tomcat>, delete the temp and work folders. They only contain temporary files.

    4. If it's a jar file maybe is for configuration, so drop it in <tomcat>/lib folder. If it's a war file, drop it in <tomcat>/deploy or in <tomcat>/webapps folder.

    5. Start your tomcat.