How to deploy war files to tomcat manually?

前端 未结 3 818
时光说笑
时光说笑 2020-12-16 05:04

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

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

相关标签:
3条回答
  • 2020-12-16 05:30

    Put it in /WEB-INF/lib folder of the deployed webapp should work. For example : if you have webapp named myapp, then put your jar in webapps/myapp/WEB-INF/lib

    0 讨论(0)
  • 2020-12-16 05:45

    Deploy web application : copy your war file to webapps directory inside tomcat.

    (Make sure that your war file gets unpacked to create corresponding directory; If your tomcat is running then you don't need to do anything else. Tomcat will take care of it automatically.)

    Deploying jar file can be done similar way by putting jar inside lib directory of your deployed application; but to reflect changes you might have to restart tomcat.

    0 讨论(0)
  • 2020-12-16 05:47

    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.

    0 讨论(0)
提交回复
热议问题