Main Page Computing Misc About

Java web hosting

Category: Computing Keywords: webjava

As you may have found out, this site is a java web application. This brings the question that I also had to ask myself: where can it be hosted?

The easiest answer is: my own computer (since I'm running it 24/7 anyway). However, my ISP has a stupid policy of blocking incoming connections on port 80. I could use another port, but then "http://www.aditsu.net:8000" doesn't look quite as good.

The next option is to use one of the millions of web hosting services on the internet. Price is an issue though, so I looked for shared hosting. Only a small fraction of the shared hosting services support java, and most of those who do, offer it optionally, for a higher price. I'm not sure what the main reason is; I guess either java web applications are harder to support, or the demand is too low.

After searching a bit, I decided to go with godaddy (using the Deluxe plan; their Economy plan does not support java). It was the cheapest I found, and a relatively big name, I figured they must do a decent job. I also found a couple of articles from users explaining that they had some problems with java hosting at godaddy, but I decided to give it a try anyway.

Well, those articles were right. Godaddy uses a very weird setup, based on tomcat. I got a folder in which to put everything... static files, php, servlets, jsp, java web applications etc. The folder itself was a web application, but I could put other web applications in subfolders. It didn't always work, and it was extremely confusing. Also there was no way to restart a web application, I had to wait for the daily tomcat restart (which restarted everything). Nothing more pleasant than waiting 24 hours for the next error message.

And yes, there were plenty of problems. First, the only kind of logging that worked for me was logging to a database (they don't allow writing to files and not even standard output). I even had to modify a library so that all the output would only go to the database logger. It took me many days to get that working, so that I could finally see... some relevant error messages and stack traces.

And then I hit all the security restrictions they had set in tomcat. Most of them affected the use of reflection in java. Again this required repeatedly modifying my code and also some library code, to work around the problems. And remember, 24 hours for seeing the result of every single change. Even more than that, sometimes tomcat didn't restart and I had to wait 2 days, and sometimes it stopped and didn't restart, so everything was down for hours.

Naturally, I contacted godaddy support about several of these problems. They always took their time, around 12 hours to get a reply, and the responses made me lose any kind of hope in humanity. 99% of them were more stupid, unrelated and nonsensical than I had ever thought possible. I'm convinced that I would get MUCH better support from a donkey or a tree.

Finally, I left a message on the godaddy boss's blog (where he always shows off how successful he is and pays pretty girls to just be around him), and got a reply from the "Office of the President". I explained them the problems I encountered and how the support was worse than useless, but their response was not satisfactory in any shape or form. Then I wrote this:

Well, try to imagine this situation:
You're walking on the street, and suddenly you get attacked by a guy who cuts your neck with a knife.
Still alive, you manage to get to a hospital. You fill in a form describing what happened and that blood is gushing out of your neck, then sit down and wait.
After 15 hours, a doctor can finally see you. He checks the form then gives you one of the following answers:

Afterwards he releases you and asks you to come back the next day if you still have a problem.
Finally, if you manage to bandage your neck by yourself, then the doctor says you are perfectly healthy and asks if there is anything else he can do.

If you can imagine this situation, then you can understand how I was treated and how I felt.

There was no reply after that.

Anyway, I managed to work around many of the problems by myself, but there was one security restriction that was wrongly affecting my code. I suspected it might have something to do with a bug in the java virtual machine (they were still using java 5 although java 6 had already been released for a long time). I couldn't find any way to work around it, other than rewriting the whole application and dropping one main library, in order to eliminate every use of reflection, even the most harmless kind. That was not acceptable; I made one more attempt to contact support, and they replied explaining how to set up the site for JSP (which I never used and had absolutely nothing to do with anything I ever told them).

So finally I decided to give up on godaddy. It is worse than hopeless. I'm still using it for domain names, I didn't have problems with that. But I'll never use any of their other services.

Then I started looking again for hosting options. I found a few providers that seemed good, such as MochaHost, HostIgnition, WestHost and EATJ, but they were more expensive and none of them was compelling enough. The next option was virtual dedicated hosting (or VPS) but I found that prices generally started from $20/month which was way more than what I was willing to pay.

Finally, around that time, the company where I was working went down (and my bosses left without paying me) and I went back to my previous job, working for a friend. He has a couple of servers in the office (which I had previously helped set up) and kindly let me host the site on one of them. So now I have total control and I don't need to pay anything.

In conclusion, if you want to host a java web application without paying much, see if you can host it yourself or if you can find a friend to help you. Otherwise, go for a VPS service if you can afford it, or try one of the few shared hosting services, but stay away from godaddy. Good luck!

Created on 26 Dec 2009, last updated on 26 Dec 2009 Valid HTML 4.01

Add a comment

Your name:Email address:
(will not be displayed)
Title:
Comment:
Note: your comment will be reviewed, and displayed later if approved.
If you see this box, please leave it empty:
Your name:Email address:
(will not be displayed)
Title:
Comment:
Note: your comment will be reviewed, and displayed later if approved.
If you see this box, please leave it empty: