May 04, 2003
Using the new connector with tomcat 4.1

The connector is a very important part of tomcat, implementing the HTTP/1.1 and AJP protocols and providing the low-level objects used in the servlet container.

It is designed as a separate layer, independent of the high-level container. The goal is to be able to use it with multiple versions of tomcat, so we reduce the ammount of code and versions to maintain. As many people still use tomcat3.3 and 4.0, and very likely many people will continue to use tomcat4.1 even after 5.0 is released, it is important to be able to use a single codebase and have fixes and performance improvements that will benefit all users.

In the last few years, many ( most? ) performance improvements in tomcat are result of connector changes - and many of the critical bugs ( security, stability ) were located in the connector.

The upgrade procedure should be relatively simple. I'll describe it here for tomcat4.1:

  • get the new connector ( I'll post the URL soon )
  • move mx4j-jmx.jar from server/lib to common/lib. This is not required, but allows you to use JMX. If you run tomcat in a sandbox - you can replace mx4j-jmx with jmxri-1.2, which has policy-based security.
  • in server/lib, replace tomcat-util.jar, tomcat-jk2.jar, tomcat-coyote.jar and tomcat-http11.jar with the new versions.
  • copy tomcat4-coyote.jar to server/lib. This is a new file containing the coyote adapter for tomcat4, used to be in tomcat-coyote.jar
  • remove bin/tomcat-jni.jar ( it is an odd file that causes several problems - if you use in-process tomcat we'll provide a different mechanism )
Posted by costin at May 04, 2003 11:14 AM