Jason Hunter has just migrated from Tomcat to Jetty:
As part of the move I’ve upgraded from Tomcat 3.2.1 to Jetty 4.2.21. Even though I helped develop the earliest version of Tomcat and have an affinity toward it, I decided to hop off the Tomcat 4.x and 5.x upgrade path. In these later versions Tomcat is no longer the lean alley cat it once was. It’s gotten a bit “thick in the middle”.
Here’s the Tomcat 5.x dependencies as pulled from gump: ant xml-xerces jaf javamail jmx jsse xml-xalan2 jakarta-tomcat-coyote jakarta-tomcat-catalina jakarta-tomcat-jasper_tc5 jakarta-tomcat-util jakarta-servletapi-5-servlet jakarta-servletapi-5-jsp jakarta-regexp commons-el commons-modeler txt2html-task jakarta-struts junit jndi jakarta-site2 jdbc jaas jta ldap commons-beanutils commons-fileupload commons-launcher commons-collections commons-digester commons-dbcp commons-pool commons-logging commons-daemon xml-apis.
Here’s the Jetty 4.x dependencies: ant commons-logging xml-xerces mx4j xml-apis.
It’s 35 to 5, by my count. In the game of Bloat, lower scores win.
Apache friends I trust said they’ve had much better luck with Jetty and its more focused design, so I followed their advice. I’ve been very pleased. It’s easy to configure, starts very quickly, and has great documentation. Only a few of the book examples aren’t working yet, mostly those related to security. Servlets are portable but their security configurations (i.e. user lists) aren’t.
Tomcat definitely gets a bad rap. The whole dependency game is a real PITA, as many people have discussed before. One of the biggest flaws that I have found with Tomcat is that you can’t embed it. Just talk to the Geronimo folks about that pain… and why do you see so much JBoss/Jetty.
I *have* noticed speed improvements with the 5.0 branch of Tomcat. It has definitely improved from that regard, and isn’t a total dog anymore. Being a reference implementation doesn’t help too, as that role brings different challenges into the mix.
When I think of it, I have enjoyed working with most of the Servlet containers. Resin is speedy, Orion is pleasant. Anything that doesn’t use Jasper as the JSP compiler is a pro (not having to use JSP is in general a pro too ;). As long as you stear from the heavy containers unless you need too, there are some great choices out there!