How to deploy war files to tomcat manually?

江枫思渺然 提交于 2019-11-29 02:20:15
Luiggi Mendoza

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.

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

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!