1

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?

Michael A
  • 5,770
  • 16
  • 75
  • 127
  • I think I didn't understand, you developed a [Jetty](http://www.eclipse.org/jetty/) like servlet container? – Narmer Sep 17 '14 at 13:23
  • i built a jersey based REST server which have embedded Jetty server. Overall i have a runnable jar which i want to put on a server and run it so it will receive requests – Michael A Sep 17 '14 at 13:27

3 Answers3

3

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.

Community
  • 1
  • 1
Narmer
  • 1,414
  • 7
  • 16
  • Your suggestion to go on deploying a war is very interesting. the thing is it takes more time to deploy the war on application server, its funny that it costs less against deploying a fully packed web server (Jersey and embedded jetty) – Michael A Sep 17 '14 at 14:02
  • Consider that with a virtual machine you have complete control over your operating system and can virtually (pass me the term) run everything you want, memory allowing. On the other hand, you have a limited liberty using a Java host and almost always you share the Tomcat server with other users. Add that Tomcat is free.. – Narmer Sep 17 '14 at 14:08
1

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

ConMan
  • 1,642
  • 1
  • 14
  • 22
1

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.

Community
  • 1
  • 1
JCrooks
  • 113
  • 1
  • 6