How to put a eclipse web project onto a real world server?
Asked Answered
R

6

17

I have never placed anything on a web server.

i have a dynamic web project built in eclipse using servlets (using tomcat 7) that connects to a mysql database that is on a computer that is on my college network.

How would i go about placing this project onto a Web Server so i can access it from anywhere. If you could explain the best and cheapest option that would be great

what would be the steps involved to make this project go live?

Rudiment answered 22/7, 2011 at 18:37 Comment(3)
Are you looking for how to make a WAR file, find web hosting, or both?Ezar
both it would seem , Firstly to package the application and ensure the settings are correct , then create the database on the server and then a web host that will support , java servlets and MYSQLRudiment
To create a WAR file in Eclipse, just right click on your project and click "Export > WAR File". This will give you a "your_project.war" which you can then deploy to your server. The rest of your question depends on how much money you have.Ezar
C
6

If you are independent vendor you have 2 possibilities.

First, take computer, connect it to network, install tomcat and mysql on it, deploy your web application, buy fixed IP, buy domain name and enjoy.

Second way is find hosting company that hosts java applications and provides mysql service. There are a lot of such companies. If you choose one you pay them money and they do everything for you. I believe that if you need java and mysql you will not find free hosting company. But try. Probably there are such companies that will provide service for free and add a couple of their banners to your site.

And yet another way is to buy virtual machine from for example Amazone cloud. You can buy the simplest linux machine. Install java+tomcat+mysql on it. Buy domain name and you are done. It is not free but it costs several cents an hour, so probably this will be the best way for you.

Cellini answered 22/7, 2011 at 18:47 Comment(0)
R
6

Amazon EC2 has free micro instance that will run tomcat+mysql! It's worth checking out!

613 MB of memory and 32-bit and 64-bit platform support

Rumple answered 22/7, 2011 at 19:8 Comment(3)
Upvoting, for mentioning Amazon EC2 free tier. @molleman, just be careful using your EC2 server, as you can easily bump yourself into paid tier if you don't pay attention.Chatelain
How would i go about deploying the war file using this?Rudiment
There are a few steps involved here. First you'll have to sign up for an EC2 account, create a micro instance, secure shell in to the instance and install tomcat and mysql. Then just copy your war into the web-apps folder of tomcat and presto. It will be some work but worth it.Rumple
L
1

In order to deploy your war file, all you need to do is copy it to the apache-tomcat webapps directory. Tomcat will open it up for you automatically, and your application is up and running.

Do not forget to make your jdbc jar file available to tomcat.

Hosting starts at around $2.45 per month. We have had great experience with MochaHost.

You could host it yourself on a system, even if you only have a dynamic IP, using DynDNS.org, but keeping a server up 24/7/365 involves a lot of work.

Leila answered 22/7, 2011 at 19:4 Comment(0)
W
0

Once you create the WAR file as Jeremy instructed, you will just drop it in the webapps folder of the Tomcat installation.

Wearproof answered 22/7, 2011 at 19:0 Comment(0)
A
0

For your reference:

You can check out with http://www.hostjava.net they have pretty decent hosting plans with tomcat and mysql.

Apostate answered 22/7, 2011 at 19:4 Comment(0)
E
-1

So that you can deploy your file, all you have to do is copy it for the apache-tomcat webapps directory. Tomcat will open it up in your case automatically, as well as your application is up and running.

Do not forget to build your jdbc jar file open to tomcat.

Hosting starts at about $3.95 per month. We now have had great experience with HostMyth.

You might host it yourself on something, in case you only have an engaged IP, using cloudflare, but keeping a server up 24/7/365 involves lots of work.

Eldwin answered 21/1, 2014 at 4:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.