-1

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?

2
  • When people refer to the "Apache server" they typically mean the Apache HTTP Server, which is not a servlet container and cannot run Java web applications. Are you referring to that, or to Apache Tomcat?
    – Wyzard
    Feb 28, 2014 at 13:17
  • Oh sorry I should have mentioned that..I meant Apache Tomcat
    – Abhishek
    Feb 28, 2014 at 13:35

2 Answers 2

1

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.

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.