Reputation: 31
I have created a dynamic web projects in eclipse which includes jsp pages and servlet.The back end of this application is Mysql and i include mysql-connector-java-5.1.15-bin.jar in the lib folder. I want to deploy this web application using Tomcat server instead of running this application in eclipse using tomcat. How is it possible?. Can any one suggest any sample codes or methods to solve this problem.
Upvotes: 2
Views: 832
Reputation: 900
After export your application from Eclipse to .WAR file you can deploy, undeploy and reload it at Tomcat Web Application Manager Panel: http://localhost:8080/manager/html.
Upvotes: 0
Reputation: 471
You can use ant build script by running that script from your eclipse your web application will automatically deploy into your tomcat. Another one option is to copy the war file into the tomcat's webapps folder
Upvotes: 0
Reputation: 1474
Step 1: Go to Windows > SHow View > Other > Select Servers Step 2: In Server Tab . Right Click > Add New Server > Add Run time if not available and add tomcat server.
Step 3: Add your project to it and finish. If you will see in Server tab, you will see your project.
Step 4: Right click on server and choose either debug or run.
Upvotes: 0
Reputation: 7164
copy the WAR file to Tomcats webapps folder and it should auto deploy. answer by Will Hartung is correct
Upvotes: 1
Reputation: 120168
you need to build a war file (or ear depending on which technologies you use), and then deploy that to your container. (in the tomcat/webapps
folder i believe). Ant and Maven, two popular technologies for managing a project, both support doing this. There is plenty of documentation on the web as well
http://www.vaannila.com/ant/ant-sample-build-file-war-1.html
Upvotes: 0