I have coded a Jersey based java server which is all wrapped in one excecutable jar.
I am looking for a web host service in which i can deploy the jar and run it.
I saw some dedicated servers which can do this but this is overshooting the need, any suggestions?
As per your comment I understand that you created a web application with a Jetty embedded server.
I think the best solution for you in this case is to get a virtual machine host, install JRE, upload your *.jar and run it from there. Given firewall permissions and correct configuration you should be able to receive requests on the 80 port. Cons? It costs. A lot.
Most of the Java hosts have already a servlet container running (almost always Tomcat) and you can only deploy your web application in it. Having an embedded Jetty server messes up everything for you.
I strongly suggest you to detach your web application (or as you called it REST server) from Jetty and deploy the *.war in any of the multiple free Java hosts to test it online.
EDIT
Thanks to you I made a deeper research on the topic and found an interesting guide to deploy a web application with embedded Jetty server in Heroku. I've never tried it nor I know if its free, but maybe you can give a try.
Digital Ocean work pretty well for me. Their basic packages are really cheap and you get root control over your own machine, meaning you can host whatever you want without restrictions. The only downside is that they are pretty old school - you have to set up EVERYTHING yourself, including firewalls etc. There are a lot of guides available on their website though, which makes life a lot easier!
http://www.digitalocean.com
I know this is a touch redundant but I don't have voting or comment rights yet so this is the only method for me to communicate.
Digital Ocean is a solid choice. I am paying 5$ a month for a VM with 512 Mb Ram and 20 gigs of storage (which for my use is just fine.) I am still working on my first proper deploy but as stated above there are tons of tutorials to guide you through it. I have no prior command line experience but I've managed to get the server running, Created an SSH key, uploaded my landing page and have gotten a test project using Spark as the embedded server up and functional in a matter of a few hours. The Droplets are easily scalable from what I've seen. I'm still having trouble deploying an Rest based app with Postgres as the DB but it seems more to do with the ports in play than anything else. Keep getting 404s.
Related
I am sure this question has been asked and answered before multiple times. But unfortunately, I am still not clear. Here is my issue.
I have a JSP, Servlet application which uses MySQL as the database. I have built the WAR file as well. Now I am in need of deploying this so it can be accessed online by anyone.
I looked into lot of areas including normal web hosting. However even though the services like DailyReazor are highly secured, they provide little for MySQL, around 250 MB for the package I selected.
Now I am looking into Amazon AWS. In AWS I am expecting to deploy my aplication and make it available online.The MySQL server should not contain limits like 250MB.
But I have never ever used this service AWS before. By reading various posts, I know that Elastic Beanstalk is the easiest way to go, but still not convinced about how to deploy it properly with database access and all. And in the other hand, will they give me a web address like "www.example.com" or will they simply provide an IP address?? I am also familiar with tomcat so I need to use it.
We will not upload files (images etc) at the moment, so I believe we can manage with around 20$ per month?
I really appreciate if someone can provide a clear guidance on deploying java web applications in Amazon, with the requirements I mentioned about MySQL, Global access and so on.
Amazon RDS for MySQL is a Database-as-a-service offerring from AWS. It is scaleable up to 3TB, and has scaleable IO as well. Of course it also depends on how much you prepared to pay. they manage the DB for you (backup etc). You get a URL to connect, credentials and you are set to go.
Amazon Elastic Beanstalk uses Tomcat. So you should be familiar with that. You upload your WAR file and specify what EC2 flavor you want (CPU/MEM etc). They launch a VM that is configured with Jva and Tomcat and deploy the WAR for you. You get an IP address.
Amazon Route 53 is the DNS service, where you can assign the IP address to your domain (assuming you have one)
Hi I'm sorry for the naivety of this problem but I need some guidance as I have confused myself greatly.
I have been tasked with creating a database(mysql) and creating a web interface for i to be interacted with. I have experience with web design and database development. Previously I have used java to interact with a DB and was hoping I could use JSP for the web interface. This is where my problem is, how I would I deploy/host this website?
I have 2 theories which are misguided:
(A). Use a cms which has a web server for me to place the jsps in?
or
(B). Use a domian/web hosting site that has a server for me to place the jsps in?
I'm totally lost and any guidance would be greatly appreciated.
Simple answer is you will require a Java Application Server to host your JSPs.
You can use Apache Tomcat, GlassFish, or some other application server to do this.
You will also need a database e.g MySQL running on your host or some other host accessible by the machine running the Java application server.
You can choose to host all of this locally or farm it out to a web host provider depending on your resources.
A CMS seems like overkill. See this link for a description of CMS and its functionality. I don't believe this is what you are looking.
I don't know exactly what you're looking for, but I think you need (B)
You need a MySQL instance running your database and a servlet container (e.g. Tomcat) to host your JSPs.
Running a CMS which is just used to use the DB that it works with is a little bit heavy for that usecase.
As suggested by Mr #cmd , yes there is no need to go for an outsourced server just to host your website, unless you need it to be visible to the world.
Else for your testing purpose, you can use Any of the Apache Tomcat, Glassfish servers for hosting the applications designed in JSP or in other web interface language.
And Inside of the JSP coding itself you may write the interaction coding with your database.
your database also can be installed in the same server.
And actually instead of a server, you may even use your PC to install the Apache Tomcat and the database and start using it.
I am working at a startup, we are just about to roll out our first beta. Knowing that we will be having a good number of users, we want to have seamlessly deployment when we are adding new features.
I have worked with windows azure before, and I know they support seamless deployment, so I did some googling and cloudbees was the first result.
So the question is, with what we have now (geronimo server, rackspace hosting), is it possible to seamlessly redeploy a java web application? If so, how?
Are there other alternative solution, such as using another hosting provider or use a different web server? (Because it is a startup, it would be beneficial if the answer keeps scalability in mind)
If with a seamless redeploy, you mean an upgrade of your application without any downtime or restarting of your server, LiveRebel might be something to look at.
See http://zeroturnaround.com/liverebel
There are a lot of methods for doing this in the java world. If you don't use sessions (or use shared sessions between app servers) you can do a rolling stop/deploy/start of your appservers, taking 1 offline at a time and using a load balancer to ensure that traffic goes to the other servers.
I have heard Glassfish has such feature, the reference probably ment this (Glassfish 3.x redeploy command) : http://docs.oracle.com/cd/E19798-01/821-1758/6nmnj7q1h/index.html
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?
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
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.
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.
Once you create the WAR file as Jeremy instructed, you will just drop it in the webapps folder of the Tomcat installation.
For your reference:
You can check out with http://www.hostjava.net they have pretty decent hosting plans with tomcat and mysql.
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.
I have just became a partner of a company that has a site developed in JAVA. As part of the agreement they allow me to create a section on their site (so I can take benefit of their traffic), but the development of this section needs to be as less intrusive as possible.
So ideally I would like to implement an independant web application in JAVA (with same layout) with a separate database that runs in the same application server. And in the application server to make a mapping like this:
All the traffic that comes to www.domain.com/MY_FOLDER
its served by my web application, all the rest should be served by my partners site.
I have no experience in JAVA but I found that in php this can be done, so I was wondering if it can be done also in JAVA.
About the application server I dont know yet which one they are using but I guess that are using "resing server" (by caucho: http://www.caucho.com/).
I would really appreciate if you can give me any ideas of how I can achieve this.
Thanks in advance,
Juan
Only one application can listen at a given socket at one time, so you need to have the existing server forward "your" requests to your web application, if it is not Java capable in itself.
The way to do that is not standardized so you will have to talk to the server administrator.
The easiest way to start from scratch with a Java Web Application is in the Netbeans bundle with Glassfish.