What is the difference between JServ and Tomcat? And what's up with mod_jserv and mod_jk?

Alex Chaffee

JServ was one of the very first servlet engines. It is now an open source project, consisting of two parts: a pure-java servlet engine, compliant with the Servlet spec version 2.0, and an Apache module written in C called mod_jserv that allows Apache to send servlet requests to the JServ JVM.

Tomcat is a completely separate product, originally written by Sun, that is now also open-source and administered by Apache. It supports the Servlet spec version 2.2, and the JSP spec version 1.1. It also contains a pure Java servlet engine, and a number of connectors for several commercial web servers.

Here's the confusing part: originally, when it was time to write a connector from Apache to Tomcat, they started with the code base of mod_jserv. Although it has been rewritten and revised to the point where it is no longer compatible with the mod_jserv that comes with JServ, unfortunately, it is still called mod_jserv. This means that if you have the JServ mod_jserv installed, it will not work with Tomcat, and vice versa.

Fortunately, the latest version of Tomcat comes with a new connector for Apache, called mod_jk. This connector supports Tomcat but not JServ. It is also more advanced, in that it supports Tomcat-style load balancing, and also supports SSL authentication (though this latter functionality is still a bit rough and may have bugs in actually *reporting* that the connection is secure).

So if you just use mod_jk and Tomcat, you should have no problems (at least as far as this connector issue is concerned).