Three Java Web Servers
[Since I wrote this I've switched over to Jakarta Tomcat, though I still like Jetty]
On Sunday, 6 April, 2000, I told you that I'm looking for a Java web server. Here's a report on the three I checked out.
I tried Jetty on Sunday, as I said I would. Last night I tried vqServer and Jigsaw. All three were easy to get up and running. All three allow java servlets to generate web content.
vqServer was probably the easiest. It comes with a Windows executable that uses the Microsoft Java VM. You can also easily set up a shortcut to use Sun's VM. By default, it starts up a regular web server on port 80 and an admin server on another port. The admin server requires a user ID and password, and then has an extensive web-based administration site. You can, and are expected to, do everything from there. It ends up editing a properties file whose header warns you not to edit it by hand. It's snappy and very small. The zip file containing its classes is less than 200K, and the entire package, including documentation, is less than 600K. This does NOT include source. Source is not part of the download.
Jigsaw was also very easy to install and run. There were three relevant Windows batch files, one to install the software, one to run the server, and one to run the administration server and client. Jigsaw is a pig, however. The installation takes up over 60 megs of disk space. How much of this is actually necessary to run it, I don't know. It would take a very long time to figure this out. Administration must be done via the administration application, which is a very complicated GUI, but also very well documented. My short take on it is that Jigsaw is an all-singing, all-dancing, does everything you can imagine, web server. It appears to pay for this, however, in speed. vqServer and Jetty were both snappy when browsed from the same machine as the server. Jigsaw was fast, but not snappy. Full source is included. The copyright file gives permission to use and modify it as you wish as long as you distribute their copyright notice. Not quite a copyleft. There's a lot of incredible work in here, but it's too complicated for me to spend the time on. I can do what I need to do with either of the other two packages.
Jetty also installed and ran very quickly. It's a little bigger than vqServer. The three jar files weigh in at about 400K total, though the documentation claims that you can trim this if you don't need all the standard features. The entire package, including source takes up about 6.5 megs of disk space. Jetty's configuration is done via a Java interface, and a number of implementations of that interface are included, some of which read the configuration info from properties files. You must edit the properties files yourself, both an advantage and a disadvantage over the other two packages. Jetty is designed to be embeddable in other Java applications, which is exactly what I want to do. It comes configured as a proxy server as well as a regular web server (Jigsaw can also act as a proxy, though that isn't the default configuration). Jetty is Open Source.
It's a pretty close race between vqServer and Jetty. I'm going to use Jetty. That was my initial intuition. I like the fact that it appears to be easier to embed. I also want, no need, nay must have source. I hate trying to figure out how to use code without source.
Note that I'm probably not going to ship with any of these servers. I'll likely use Apache and a servlet plug-in. Maybe I should just bite the bullet and do that right off the bat, but I need to get up a demo quickly, and this seems like the fastest way to do it.