For the last 6 years I’ve had total control over my deployment environment (running my own servers,) and never had a problem with Java.
Recently I moved to commercial 3rd party hosting, where I had a private JVM but no control over my server set up. To make a long story short, I have now been dealing with Java deployment hell … Java is not playing nice.
My experience
After 6 years of enjoying the comforts of having my own server, for whatever reasons, I moved to 3rd party hosting. What took me by surprise was how hard it was to find a suitable Java hosting company. I went through 4 before I found a company that actually was able to do the job properly.
-
One of the big selling points of Java has been the write once and run everywhere theory - sounds great and apparently people have had a lot of success with this … but my experience has been something else.
A couple of tips:
- If you can, deploy on your own servers: Java is much easier to handle when you control the box.
- Never go with Java hosting that shares the JVM.
Without a private JVM, you cannot restart the server (Tomcat, Resin etc) and so updating classes and property files are a pain. And since you are sharing the JVM, anybody’s code might take your app down.
Anecdote: With the first host, when I uploaded my simple POJO based application (that had been working on my servers for a couple years with no problems) I took down the whole bloody server! Strange that this still happened despite the fact I had had the same configuration?
Anyway, they gave my ass the boot and I had to move on to my next victim!
Conclusion:
Java is brittle in a shared environment, hard to configure and problematic - it sucks. I think this is a symptom of the Java community’s need to over-engineer everything and shows how Java is no longer suitable for small and medium size application development.
The alternative:
Right now I would go with PHP because it is easy, fast and everywhere. It’s not the perfect language but it makes building web applications really easy compared to Java.

I’ve been going through the same problem. PHP is the way to go if you don’t have your own servers and are working on small, mid-size projects. I booted myself from a few places. Most hosting companys claim to support java apps but if you do anything outside of a “Hello World” application your asking for trouble. I hosted sites out of my kitchen a long time ago but got tired of being chained to the machines all day and night. I even had a dedicated server running Jboss at … year 2 came on my contract and I asked for at least a P4 processor and some more ram. After the “Upgrade” the server was just about worthless and the “support” people blamed on my jboss configuration. “Jboss put a script somewhere” … Needless to say I’ve left that establishment. Got tired of incompitent support … am now homeless … I’ve been through 3 more hosts with even worse issues.
I use dailyrazor.com hosting and their tech support has been pretty good.
Thanks for writing, this is an interesting topic I have never heard anyone speak of before … I wonder how many others have the same problems?
I’ve just outgrown managed stuff. Just bought a server and plugged it into a local ISP. If something %^cks up it’s my fault. I don’t have to talk to another mcdonalds support tech without a clue … oh my god it’s like flying for the first time !
WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
Rare article this is, I am also looking for java host, but the cost is way bigger than PHP and others, could you post the costs that you have with your home server ?
Java’s dirty little secret: terrible in a shared hosting environment.
-
Most websites can run on an ADSL line with a static IP - around here that’s about $90 USD/ month. ADSL can only upload at a max of say 90Kb/sec, but that is more than enough for most websites. In fact, I ran sites that got over 100 000 visits a month on an ADSL.
I moved to a dedicated server on a big back bone recently because Killersites.com’s traffic is far greater…
-
You will pay more for Java hosting because it requires much more skill to manage and is generally a much bigger hassle than a PHP or Perl install.
I personally think that the Java community will move into Ruby and their web framework, Rails.
In fact you can host your web site with ADSL even with a dynamic IP, you then either use dynamic DNS or IP posting, that are two methods of letting peoples reach your site.
The back side is for emailing, since most email server will reject your emails if your server is not having a fix IP. Anyway, you can always rent a $10 space anywhere where they provide the MX for your email and they host the email server by the way.
Then you keep control of your webserver at home and whatever happen with the java side is up to you
What is the bandwith of your adsl? 100 000 visits sounds huge unless your adsl is very fast. BTW, please can you explain why adsl can only upload at 90kB/s ?
“BTW, please can you explain why adsl can only upload at 90kB/s ? ”
That’s just the limit of the technology. Download capacity is much faster.
I’ve been developing some stuff with Sun Java Studio Enterprise 8 and now that I’m coming around to deployment time, I was thinking of getting it hosted.. after reading this blog I having second thoughts and may go down the ‘own the box’ route.
If you had to setup your own Java Enviroment what sort of setup would you go with? (OS/Software wise)
I’d be really interested in hearing about other peoples experience with setting up their own ‘java’ box., Cheers Timo
@Timo.
I ran Resin on Win2k for years without a hitch. My line was an ADSL (6 meg down and 1 meg up) and it was fine for most sites.
I eventually had to go with a provider simply because my bandwidth needs began to choke the line…
I now use both shared hosting and I also have a dedicated server. For shared hosting (on Java,) I use Daily Razor and they are pretty good:
1. You can stop and restart Tomcat yourself and you have your own memory.
2. The support (via email) is very good - they always respond quickly.
…
But Tomcat goes down once every few weeks to a month. Personally, I think Tomcat has its issues ….
i am also at the point of bringing my site into the public arena and wondering about who will host it.
My problem is that i have a broadband access running into a wireless router. not sure of the security of the whole setup. i mean what happens when hackers, script kiddies, get a hold of my IP address? don’t have a hardware firewall setup and my wife is not technically competent enough to work outside a firewall, so what do i do with her 10 email requests and 100 google request / day ?
Even though i am used to having the servers real close by at work, would feel much safer if the target hacker are trying for is not my home IP address.
Would really like to know other developers thoughts on this matter
All the best,
Jim
I ran my own server in house with a software NAT for 6 years with no problems.
With most of your ports closed, you take care of the vast majority of hackability of your server.
Recently I have encountered with a similiar problem.For the solution of that problem I suggested using both a cheap HTTP based(in the simplest configuration) webhosting and an ADSL connection together.
The reason is simple:
1-) An aditional webhosting is very fast for transfering pics etc from the site but ADSL connection maybe used more efficiently for data processing and specially with database operations.
2-) For those reasons I wrote a webserver , an application and database interaction with page and application all in java.
3-) The main web site was one running on webhosting site and I put connections to that web server running on ADSL router when it is necessary.(for manipulationg forms, creating dynamic html, scripts and database opeartions etc)
The final result was hopefull for middle and small size bussiness if you dont want a dedicated server or java hosting…
I can certainly relate to this. I am in the midst of perhaps the worst service I have ever received from any service provider — not just web hosts but any provider. I have been with 4java.ca for just over two months and in that time I have experienced three unannounced outages and three unannounced migrations to different servers. The site has been down probably 10 hours at least. When they migrate you they screw up your configuration and make no attempt to restore the latest version of your content or data. I have a CMS and when they restored my files after an outage, everything was over 8 days old. Before they help you, you first wait hours to even acknowlege you, then there will be a volley of emails in which they insist that nothing is wrong. Today I was kicked off for allegedly exceeding server use limits, though my Plesk control panel said I was way under maximum. I am now trying to get access to my database data, and, as ever, it has been hours since I made the request.
These guys are atrocious. They’re horrible. They should be run out of business.
4java.ca sucks!!! Pass it on.
@MM,
It would seem to me that Java needs to have a totally dedicated server. It has a big footprint and configurations are fragile.
I have moved away from Java (after several years of working with it) into PHP and for my small to mid sized applications, I have not one complaint. Literally, PHP has never failed … not once!
With PHP 5 you have full OO, data abstraction layers, MVC frameworks to choose from etc …
Yes, the language does have some inconsistencies with function names and some other minor annoyances, but with IBM and Microsoft now backing PHP, it makes for a good choice.
I’m at 4java.ca as well and MM hit the nail on the head. Their servers are wide open to anyone with an SSH connection or a php script kiddie. I got hacked twice on two domains in the last week and they’re telling me it was my fault. You only ever get one support interaction per day though their support website and that’s usually in the morning. Imagine how long a conversation could take! It’s been four days since their last response on an open ticket - that’s after I said I was unhappy with the service and said I was considering leaving. I guess I know what I have to do, the question now is where to go? Java hosting is a pain in the a$$.
-Mark
Well, i’m using eapps.com hosting environment for quite some time now but i’m pretty pleased with it. Altough i can still relate to the article, i have only found one hosting provider with proper Java hosting mentioned above.
Rutger,
How much effort is it to manage the complete V-server? I’ve seen a number of posts from people that are pleased with eapps.com. I don’t mind spending the extra $$ if it means I can do what I want. I’m just worried I’d be in over my head managing all the stuff that makes it work.
If it helps, I’ve been running a windows server at home for years with PHP , Tomcat, MySql and others… My Linux experience has been limited to setting up a few workstations and Linux webhosting.
Or should I just get a LAMP account somewhere like Dreamhost and forget the Java environment altogether?
-Mark
“How much effort is it to manage the complete V-server?”
.. Depends on the interface that the company provides. Most will give you a web based management application such as CPANEL’s WHM or Plesk.
Both are easy to use and make doing the most common operations point-and-click easy. So things like creating hosting accounts (websites), creating MySQL databases etc … is very easy.
I too went from Windows based servers to Linux and I can tell you that with one of these applications, the change isn’t so daunting. I personally feel that I have more control than I did when running W2K server.
I’m using Daily Razor to host my quite large java application (sky-map.org). The provider is quite reliable, email support is perfect (as was mentioned above). Private JVM with 128MB heap is about $35. Bandwidth is limited to 100GB/mo and disk space to 5GB and upgrades are expensive. My app is getting close to limits on disk space. I had to move images and some services to a different provider (php). I’m looking for alternatives, but can’t find anything better. Probably I would have to move on dedicated servers soon.
Hi,
We’ve been on Daily Razor nearly two years now (give or take) and the service has been very good.
I’m coming up on my one year anniversary with DailyRazor. Good service but they are trying to rip me off for the sign up offer of 3 free months. I’ll probably have to just insist they kiss me first next time because there is not a lot of competition in the Java hosting world and I’m too old to learn something new.
Don’t blame it on java, blame it on web hosts that do not understand
jave.
Been use www.webappcabaret.com for years, and it has always
offerd private JVMS and the latest versions of Tomcat, JBoss, and Jetty.
@RW,
Given that so many host seem to have problems, it would seem to me that that is a weakness in the Java platform.
PHP setups are trivial - and PHP offers a lot of power for cheap … if you know what I mean.
That said, I’ve found good Java hosting companies as well … it is just a lot harder to find, and that is the main point I think.
Stefan
It depends on host config. Most of hosts runs tomcats behind Apache, and you’re getting double mapping problems. Once at Apache level (mod_jk) and second at tomcat (web.xml). Best solution is to get standalone Private Tomcat (or behind apache with mapping /*) and create hostname like. php.mydomain.com for php apps, etc. I use it under hostjava.net and life is much easiest now. You should ask your host for apache mapping /* then give it a try. java is still powerfull.
very interesting and timely discussion…It appears that lots of people here are using dailyrazor.com…I just did some research andlooks like that dailyrazor uses 1and1 for hosting their servers…
Here is server data from http://whois.domaintools.com/sky-map.org
Server Type: Apache/1.3.33 (Unix)
(Spry.com also uses Apache)
IP Address: 82.165.132.179 [Whois] [Reverse-Ip] [Ping] [DNS Lookup] [Traceroute]
IP Location: United States - Schlund + Partner Ag [i.e 1and1]
Response Code: 200
Blacklist Status: Clear
SSL Cert: No valid SSL on this Host
Website Status: Active
Problems with Java hosting are not limited to the config issues but are also a factor of how memory is allocated. Since a JVM can soak up as much memory as needed to run a web app and never let it go you have significant limitations on how many private JVM’s can fit on a physical machine. For example, I have a java app that I use to share hundreds of (3-5MB) images with family and friends. The application creates scaled copies of each image so that it can send an appropriately sized image to those with tiny monitors and dialup etc… The problem I have is that when scaling the images it consumes a *ton* of memory and my home based webserver is always providing ‘out of heap space’ errors. Sure, I could buy more memory but how much should it take to generate thumbnails? I have Java hosting but could never host this app ’cause of the memory required to run it.
-Mark
Regrading Java and memory:
I too have found Java to be a big memory hog - it’d like a fat man at a buffet!
With one threaded application, it is so bad, that we are now porting it to ruby. The Java app keeps sucking the memory dry - we have to restart Tomcat every few days.
… Which reminds me, I got to check my thread count before it takes down the server again!
Ach!
Hi guys, that is a discussion I have been looking for for ages!! I have been using visionwebhosting.net for some time and they’re rubbish! Not responding to emails and msn… during the last month my site was down for almost 50 hours altogether… java hosting is a real pain in the ass…
maybe i will try dailyrazor if u say it’s good, but damn… why so much trouble
I paid futurepoint.com $80+ for a java hosting, and for the domain registration paid thru internet, but not only did they register the site in their own name, they refused to give me access to the server also. first time facing such naked fraud. Now I m planning to rewrite my code in PHP and will host in some reputed places like yahoo.
Does any one know a good hosting company that hosts resin server.
thanks
sj
I must be doing backward thinking. My website is currently using php. I’ve just finished re-developing it in java and looking for a java host. Now, I need to think twice about deploying my java website. For Santhosh, never to take up a free domain name offer. The hosting company would register it under their own name. You would lose your freedom to move to another host should this one doesn’t work out. Never to host with Gisol.com; it would give you the same treatment. I recommend IXWebhosting.com should you decide to go with php.
Java is definitely tricky to host. As a hosting provider of private Tomcat, Resin, and JBoss JVM’s, I can attest to the complexity of the setups. After a customer signs up, we can usually expect to have anywhere from a week to a month of frequent interaction, just trying to get their app up for the first time. This is largely because there really doesn’t seem to be an industry standard way of doing things.
Some have shared JVM’s, some are private. (though ours are all private for several reasons) Some are behind Apache with mod_jk, some are using mod_proxy, others use mod_rewrite, and others use the Tomcat http connector straight-up. Creating the ApacheTomcat mappings are always a custom (per-client, per-domain) job, and frequently the tomcat config itself is a custom job as well.
All in all, tons of complexity! Compare to a PHP setup where the biggest variation is if safe mode is either on or off and you get a feel for why it’s so hard to find good Java hosting. In the face of such complexity, I’m fairly proud of the tradition our company has built supporting Java hosting. (google for “kattare reviews”) A couple more companies like ourselves out there and Java may shake the negative trend a bit. In the meantime, we’re more than happy to offer PHP or RUBY hosting, it’s dead simple in comparison.
Interesting comment:
“In the meantime, we’re more than happy to offer PHP or RUBY hosting, it’s dead simple in comparison.”
I can’t say for Ruby, (had problems getting Ruby to play with Apache,) but PHP is crazy dead simple.
Thanks for the comments Kattare.
Stefan
Does anyone know of any good managed Java colo’s or dedicated hosting companies?
I am trying godaddy.com for my servlet based application portal.
The support was good until I was stuck with write access permissions to my own ftp account on their server using ftp commons API in my servlet.
The support team is clueless on why I can not write to my own ftp account. They maintain I have access to write but it appears I do not. They refuse to look into the code snippet I wanted them to review and help in resolving the issue.
easy,
you’re using Shared Tomcat or Shared Resin server,
the server is running under another user (like a “tomcat” or “resin”),
that’s why your servlet can not write to your directories.
Try to change permissions for your directory you wish to write to,
and grant +w access for “others”. Then try if it works.
If it works (and it should works), check what is a file owner of your new files.
I Just found you’re trying to use ftp commons API
so the hint with directory permissions will not fix the problem.
I think the host should check server logs and search for your connections, maybe there’s some fail logins or similar… you can also try to debug your app and find out where exectly the problem is with ftp server. (you may also try to open ftp connections for “localhost” instead of server address).
Was doing a search and came across: http://www.omnicus.net/. They said “Databases, SSI, phpMyAdmin, Tomcat 4.1.31, JSP, Servlets, J2EE, Struts, JBoss”. Best selection I’ve seen - don’t know about service. Haven’t made the plunge yet, waiting for summer.
I had pretty good experience with RimuHosting for a brief while. I stopped using them when day job meant I had no time for my personal projects, but they were pretty decent & responsive in the short time (few months) I used them.
While hosting my application which have java and DWR it shows error like DWRUtil or DWREngine is undefined, there any one who have idea related to this one. Its very urgent
I have stumbled on this thread. Some good comments. I’ve been with 4Java.ca since beginning of 2006. So far so good. NO issues. We have a lot of highly secured databases with them and run Tomcat sites. Certainly the guys don’t oversell as our applications run pretty good on their hardware. Plus we get access to their expertise on Java hosting - a lot of host set up Java hosting by installing Plesk - but have no clue what all the configurations files are about. So verify with your prospective hoster for Java they know what the difference between Java and JavaScript is :). Running serious Java applications requires understanding of JVM. Mohan’s issue above is a good example, non-java host will have no clue what it is.
Cheers. Roger.
Roger Lokhan,
Just how secure are your 4Java sites though? Login through ssh and wander your way up the directory tree. One level up and you can see all the sites that share the box. Hmmm… Poke your head into a few. That was easy. Next try checking permissions on some of them - There will no doubt be a few that are wide open - and not because they’re intentionally set that way - on my site they were like that by default! Only after being violated did I become aware of these issues. How about doing a php include to grab a file from one of those directories. I had two accounts there and tried it. Way too easy to grab a config file using simple php.
Security issues aside one email response per day doesn’t cut it.
No way baby. Not 4me!
-M
Mark,
Unix can be pretty tricky to secure with shared hosting accounts. PHP was quite a challenge for us () because it typically runs as a module in apache, which generally requires that files be world readable in order to access them as the apache user. Tomcat/Resin/Jboss, no problem, since all we do are private JVM’s, the user can strip all of the world and group bits and still be fine. We ended up (at the expense of some performance) setting up PHP such that it runs as the user of the account in CGI mode via suexec. Now users can strip all of the world and group bits for their php scripts as well. (with the added bonus that each user can now have their own php.ini) For apache (/images and *.html for most folks) stuff we still have to have the world readability, but with the right defaults on the users home directory, other users have to know the filenames in advance to reach the files, and even then if the user has set the perms properly there shouldn’t be anything really exposed. I started to write a bunch more but realized that this would make a great FAQ entry, so I created one here:
I would love to hear your input on ways to improve the security model… it’s really tricky with web hosting in a shared environment.
Kudos to you for spending the time to get it right. …and for telling your users what they should be looking for!
I have no doubt that it can be complicated and I won’t pretend to be an expert. I know enough about it to protect myself from the obvious vulnerabilities.
With my current host they’ve disallowed ssh access to the box (unless you make a valid business case for it) to limit the number of people with command line access. It’s a CPanel host so I can do pretty darn near everything I need to except command line backups. I’ll be working on a cron script for that (anyone?). They don’t do ASP or Java but I’m ok with that as the only Java web app that I still use would never run on shared box hosting anyways due to it’s high memory requirements.
Perhaps actively monitoring bash history files would quickly identify snoopers. I’m sure someone more experienced than I could write an elegant grep command to highlight a few key identifiers.
-M
I was going through this post as I had the same bad experience of hosting java app and i read someone said dailyrazor provides good support - WRONG - they are just good in restarting the server - not technical enough to help you on anything. I got the VPS from dailyrazor for java hosting. They promised 5GB of diskspace and they gave me 5GB but out of this more than 70% is already used by the default apps installed on the server and they are not willing to clean it up for me. I don’t need those shitty apps and I never asked for those! Secondly, out of 512 MB of RAM 476MB is already consumed by these apps. The server is dead slow. I can’t even run simple java from the terminal cause there is not enough free memory on my VPS. Now cause I have already paid to them, so I’m going through processes and directories to find out which one I could remove without having a major impact. My suggestion to all of you who are looking for a Java Host: always ask for the complete configuration that you’d be offered for the price. Just knowing the OS and the webserver name version are not enough.
BTW, for those who still doubt the “PITA to setup Tomcat vs PHP”… have a read here http://www.coreservlets.com/Apache-Tomcat-Tutorial/
That should make you either very scared or very depressed, I can’t decide yet which I am… scared to go with a hosting company or depressed to roll my own & set it up. Either way, this sucks.
Cheers,
Fil
(Hmm, I guess this blog is moderated… would be nice if some mention was made of that fact - I thought my post was eaten)
Let’s try it again…
www.tektonic.net/unmanaged.html $15/month
10GB HD, 300GB BW, 1 Domain, 256MB RAM
www.slicehost.com/ $20/month
10GB HD, 100GB BW, 1 Domain, 256MB RAM
rimuhosting.com/ $19.95/month
4GB HD, 30GB BW, 1 Domain, 96MB RAM
serveraxis.com/ $30/month
20GB HD, 400GB BW, 1 Domain, 512MB RAM
www.4tvirtual.com/ $15/month
1.5GB HD, 50 GB BW, 1 Domain, 300MB RAM, 160MAX pids
www.linode.com/ $19.95/mo + $10 setup
8GB HD, 100GB BW, 1 Domain, 256MB RAM
www.vpsland.com/ $15.99/mo ($15/mo if prepay 3mo)
6GB HD, 150GB BW, 1 Domain, 192MB RAM, 256MB SWAP
No cpanel
www.getnet.net/ $9.95/mo
1.5GB HD, 10GB BW, 1 Domain, ??MB RAM
www.godaddy.com/ $25.49/mo if prepay 1 year
10 GB HD, 500GB BW, FC6/CentOS 4, 256MB RAM/1GB BURST
www.easyawebhost.com/ $29.99/mo
20GB HD, 250GB BW, 1 Domain, 256MB RAM/768MB BURST
Many of the above are shared JVM so they can be discounted. The options really fall down to $40/month or rolling my own server and then setting it up. Either way it sucks. Sorry about the fragmented posts - fighting a blog form (this one) that’s eating my posts.
I’m all ears for good news.
Thank you gays. I do have the same experience with many java hosting. I always goes for private JVM. But the hosting managed to break everything with incompetence. Very terrible.
Prokmu, SuppleHost, PC HighWay LLC, are all the same.
I will go with my own server, as advised. I have no problem configuring and keeping it up well.
I have a dedicated server which is running Resin on Windows. I set it all up myself and for 2 years all is ok. But it is pricey: USD $100 month.
My usage is minimal and I am considering other options. However maybe someone wishes to share the server with me - and the cost.
cello9@gmail.com
Robert,
I had that setup myself (Resin on windows) and it ran great for about 4-5 years.
Funny, Java (at the time) ran best on Windows. The irony.
Stefan
If you’re not wanting to have to deal with the setup/management of an unmanaged dedicated server, Kattare recently dropped the account level requirement to get a Private JVM from the Level 3 account to the Level 2 account. So you can now get a private JVM in a shared account for $19/mo. Should be more in line now with Oxxus and 4Java.
FilG, Thanks for the notes.
Regarding: http://www.coreservlets.com/Apache-Tomcat-Tutorial/
That tutorial is wonderfully in-depth and comprehensive. You must be feeling word-count shock.
I have set up Tomcat 4, 5, and 6 many times in hosted environments and at a site that gets millions of hits a day, so I will add my 2 cents…
Large sections of the tutorial can be ignored if you:
1. Skip apache web server in front of Tomcat and just run Tomcat standalone. The performance gain of the apache webserver is over-rated and over the years has become slim to non-existent. The extra configuration and separate logs of the apache web server are not worth the hassle.
I run two sites hosted at kattare.com with a standalone Tomcat without any problems. The unnamed site with millions of hits per day also uses a standalone Tomcat and it has not been proven to have any performance problems with static content (the bottleneck is always overuse of the database).
2. use one of the preconfigured Tomcats instead from coreservlets.com:
http://www.coreservlets.com/Apache-Tomcat-Tutorial/Preconfigured-Tomcat-Version.html
3. test on your local system and only deploy on the server, so use of Invoker and other debugging/reloading details can be ignored.