简体   繁体   中英

Deploying Eclipse Java Dynamic web project on Apache Tomcat permanently

I have a Java web project in Eclipse which I run through Eclipse on Apache Tomcat.

Is there a way for me to permanently deploy the project on Tomcat such that it runs without having to open Eclipse and rather just starting Tomcat? If yes, then what steps do I need to follow?

* UPDATE *

If I take the .war file and deploy it on another system will it work? Note that I am using a MySql database in this project. So will transferring the .war file also transfer the database?

You package the project into a war file (since it is a web project) and put that one into the Tomcat's webapps folder. The deployment should then happen automatically, when Tomcat is started.

Generate a WAR file within Eclipse. (Properties->Export->WAR File) Place this file in the {installation}/webapps folder of Tomcat. It should deploy now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM