Use this comparison matrix to learn about the differences between and relative benefits of the popular open source application servers JBoss, Tomcat, Glassfish, and Jetty.
From the generally thin-featured offerings and questions of security of the early 2000’s, the Application Server category of open source project has matured to compete squarely with their commercial counterparts. Sometimes the terms ‘Application Server’ and ‘Web Application Framework’ are used interchangeably; we’ve distinguished between them for our research. By Application Server here we mean ’servers of Web based applications’. You’ll want to look to the Web Frameworks SweetSpot for more information on the web application frameworks developed by the open source community.
The following tables represent research completed in the fall of 2007 by OpenLogic. We went to the experts — members of the OpenLogic Expert Community who are committers and expert users of the projects — and asked them to answer a set of questions. Members of Tomcat, JBoss, Jetty and GlassFish responded. Use the resulting information as a tool to plan your projects.
For comprehensive information on each project compared, locate it in the OpenLogic Enterprise Exchange library by accessing the ‘Browse Open Source’ tab.
The five questions we asked the experts appear below. To view more detail on the projects* compared across each question, click the question.
- What’s the ’sweet spot’ of your project? For what type of projects should users strongly consider it?
- What type of scenarios does your project not fit into as well? Would you recommend another project in this scenario? If so, which one?
- Of the projects included here, which have you tried? Of those, which ones did you like or dislike, and why?
- What is the future of this project? What’s coming that will ease development?
- Are there myths about this project that you’d like to challenge?
For comprehensive information on each project, search the OLEX Open Source Library. For a list of the open source developers we interviewed, click here.
Summarized Responses
What’s your project’s ’sweet spot’?
This is a summary of the responses. For full detail, click here.
| Project | Summarized Response |
|---|---|
| GlassFish |
|
| Tomcat |
|
| JBoss |
|
| Jetty |
|
What sorts of projects does this package not work as well for?
This is a summary of the responses. For full detail, click here.
| Project | Summarized Response |
|---|---|
| GlassFish |
|
| Tomcat |
|
| JBoss |
|
| Jetty |
|
Of the projects we’re comparing, which have you tried?
This is a summary of the responses. For full detail, click here.
| Project | Summarized Response |
|---|---|
| GlassFish | Tomcat: liked
Geronimo:liked
|
| Tomcat | CauchoResin: didn’t like
Jetty: liked
GlassFish: disliked
Geronimo: liked
JBoss: liked
|
| JBoss | Tomcat: liked
Jetty: liked
GlassFish: didn’t like
|
| Jetty | Tomcat: liked
JBoss: liked
|
What is the future of this project? What’s coming that will ease development?
This is a summary of the responses. For full detail, click here.
| Project | Summarized Response |
|---|---|
| GlassFish |
|
| Tomcat |
|
| JBoss |
|
| Jetty |
|
Myths
This is a summary of the responses. For full detail, click here.
| Project | Summarized Response |
|---|---|
| GlassFish |
|
| Tomcat |
|
| JBoss |
|
| Jetty |
|
Complete Responses
What’s your project’s ’sweet spot’?
This is the full response. For a summary of the response, click here.
| Project | Full Response |
|---|---|
| GlassFish |
|
| Tomcat | Tomcat’s sweet spot is it’s extremely configurable and pluggable design. This means that every component inside of Tomcat can be exchanged with one you or someone else has developed without changing Tomcat code. This is all managed via the configuration file. This ease of use has contributed to making Tomcat the most popular servlet engine today. This popularity results in a very large user base and access to lots of expertise. Additionally, and it’s easy to find developers with the Tomcat skill set. |
| JBoss | The biggest advantage of JBoss is ease of use. Installation is as simple as unzipping a file; deploying the application is as simple as copying a WAR/EAR. Support for expanded deployments makes development more productive.
JBoss should be considered for any Java EE project. Even if the project officially uses another application server, developers could use JBoss during development to increase productivity. |
| Jetty | Whilst Jetty is an excellent servlet engine on any measure, it is extremely lightweight and so easy to embed into another application. We have a number of applications that require embedded HTTP servers in which we have used Jetty very successfully.
The entire Jetty codebase is only a few hundred KB, and as such it is ideal for environments where memory is a premium. For example, many devices such as routers and modems have Web |
What sorts of projects does this package not work as well for?
This is the full response. For a summary of the response, click here.
| Project | Full Response |
|---|---|
| GlassFish | Generally speaking, GlassFish fits any type of scenario requiring a full Java EE application server or Servlet container. In older versions of GlassFish (Sun Java application servers), it was not suitable to replace a Servlet container like Tomcat or Jetty but the new Grizzly engine used in GlassFish allows it to operate as well as Tomcat and Jetty in place of a Servlet container. In addition, it has a very easy and reliable cluster management and failover recovery which make it a wise choice. The one scenario that current versions of GlassFish does not fit is any embedded use case where a container should be embedding in-process. For this scenario Tomcat fits well. |
| Tomcat | Any that is no java, of course. And, fullblown J2EE applications, for this you can use JBoss, Geronimo or Glassfish, all of which run a version of Tomcat inside. |
| JBoss | Technically speaking, I don’t know any scenario into which JBoss would not fit (that doesn’t mean such a scenario doesn’t exist, I’m just not familiar with any). |
| Jetty | If J2EE support beyond servlets is required, something like JBoss or Geronimo would be a better choice. It should be noted that technically speaking, neither of those are Servlet containers but instead include a Servlet container (typically Tomcat or Jetty) that is used to handle HTTP requests. Given that Jetty is only a servlet container, it does not support EJBs and other J2EE components except servlets.
Some applications may require that business logic be housed in a separate EJB tier which Jetty does not support. In these cases something like JBoss or Geronimo would be a better choice. Note that even in this case Jetty would still be an excellent choice for the HTTP/Servlet component of the application. I do not |
Of the projects included here, which have you tried? Of those, which ones did you like or dislike, and why?
This is the full response. For a summary of the response, click here.
| Project | Full Response |
|---|---|
| GlassFish | Tomcat: liked
Geronimo:liked
|
| Tomcat | CauchoResin: didn’t like
Jetty: liked
GlassFish: disliked
Geronimo: liked
JBoss: liked
|
| JBoss | Tomcat: liked
Jetty: liked
GlassFish: didn’t like
|
| Jetty | Tomcat: liked
JBoss: liked
|
What is the future of this project? What’s coming that will ease
development?
This is the full response. For a summary of the response, click here.
| Project | Full Response |
|---|---|
| GlassFish | The GlassFish kernel is slated for redesign in version 3. The new kernel is based on an HK2 module sub-system which makes it possible to start GlassFish in a cell phone or embed it in-process. Other enhancements include some to performance: GlassFish will start within few seconds (less than 5) using a lazy loading mechanism for its module and sub systems. There will be an upgrade for GlassFish in early 2008 which make it possible to use GlassFish on AIX operating system. GlassFish version 3 will support Java EE 6 profiles in addition to support for scripting languages like JRuby, PHP, JavaScript (server side). Support for these languages will be available through containers which are already implemented to some degree. The next version will include improvements for high availability (JMS high availability, in particular) using HADB. GlassFish has an auto update mechanism that allows administrators to create an update center with new or updated application server artifacts and update all server instance from that update center. This feature allows the update of application servers or install of new modules on the server. In next version of GlassFish, it will be possible to update deployed applications using this update center. |
| Tomcat | Continue along the same path, it is now a commodity software, no revolutions inline but to make it better, more stable and faster.
JSR-315 is next on the list, which is servlet 3.0. |
| JBoss | No information available. |
| Jetty | Jetty is still under active development and a number of new features are being added to fulfill today’s requirements of a servlet container, including Continuations and Async SSL. |
Are there myths about this project that you’d like to challenge?
This is the full response. For a summary of the response, click here.
| Project | Full Response |
|---|---|
| GlassFish | The most insidious myths about GlassFish were allayed by SUN’s release of the SpecJ benchmark reports. SpecJ reports debunking myths about GlassFish performance are worth looking at – here and here. |
| Tomcat | There is one myth, and it was around for a long time: Tomcat is great for development, but should not be used from production. While this may persist in some companies, many have realized the cost benefit of Tomcat, and its maturity. |
| JBoss | Lack of support, and an inability to handle mission-critical projects. Neither of these are true. |
| Jetty | One is that Jetty can only be run as part of JBoss or Geronimo. This is not true, the only reason Jetty would need to run as part of JBoss or Geronimo is if EJB support is required.
Jetty doesn’t have support for JNDI or LDAP integration. This is not true, JettyPlus (http://jetty.mortbay.org/jetty5/plus/index.html) has support for JTA, JNDI, JAAS and Javamail. |
Acknowledgments
OpenLogic would like to thank the following members of the OpenLogic Expert Community for their contributions to this effort and invite the community to email us if they’d like to augment, correct, update, refute or dispute any of the information included herein.
| Project | Contributer |
|---|---|
| Glassfish | Masoud Kalalil |
| JBoss | Felipe Leme |
| Jetty | Dmitri Colebatch |
| Tomcat | Filip Hanik |
