I don’t do any of Java development on my DH-hosted site only because a current JDK and servlet engine aren’t installed on my server (dali). While I certainly don’t mind having had to use Python to develop cgi scripts for some projects I’ve released on SourceForge, I make a living writing server-side Java code and have a lot more experience with Java. I’m toying with an idea for a cool new open source project that I would like to run on my DH server, but I want to develop it in Java.
The main Tomcat configuration file, server.xml, allows you to specify virtual servers in a way that is similar to how Apache httpd does it. Tomcat also comes with an HTML management console that allows you to deploy web applications. I’ve never had to set Tomcat up to work with virtual servers, so I don’t know how hard it would be to configure Tomcat so that different users wouldn’t accidentally stomp on each other.
Another challenge is that hot deployment of web applications on Tomcat seems to have memory leak problems (i.e., objects not being properly marked for garbage collection) after a few tens of hot deploys. This is typically only a problem if you use the client vm. On a server, you should use the -server jvm argument.
At work, we use clusters of servers and we wrote our own load balancer, so we recycle Tomcat on each server, one after another, during a web app deployment. This may be overkill, but it allows us to do rolling upgrades with no downtime for any of our clients.
Tomcat 5 comes with a load balancer. I haven’t compared it to the one we wrote, but it may have similar capabilities.
There are a lot of companies out there that provide servlet hosting. Just search on “servlet hosting” to find a list of them. The main two I have been looking at are:
though I would obviously prefer to keep everything here.