I have been involved in the Apache Tomcat project for the last 12 years. In working with this software daily, I have had the opportunity learn a great deal about the inner workings of Tomcat, it’s role in the enterprise infrastructure, and the many ways in which Tomcat can shine as a Java application container.
Apache Tomcat is a lightweight, open source Java application server that serves as a reference implementation of the Servlet specification.
The servlet specification is the official definition of a Java web application. At a high level, this specification let’s everyone know how to layout their application, how the requests are handled and how the responses are generated. Tomcat is an implementation of this specification.
The first servlet specification was over 25 years ago, and has now reached Servlet 5.0 in Tomcat 10 (although Servlet 4.0 in GA release of Tomcat 9). Tomcat 10 is in alpha (pre-release) at the time of this writing.
Tomcat is an excellent Java application container, but it is not the solution for every problem. Some applications will require a setup that implements the JavaEE specification, and Tomcat does not.
The enterprise edition (EE) specification has a lot of features, as does Tomcat, but the fact that Tomcat does not implement this specification is not necessarily a bad thing.
By not offering full EE functionality, Tomcat is much lighter, it does not require the same amount of computing resources to run as WildFly or WebLogic. It does not load components that will not be used and therefore does not waste RAM, processing power or time.
Tomcat provides the means and methods for deploying Java web applications. Deploying a web application is simple, just place the war file or the directory containing the web application in the folder called “webapps.” There is also a provided management application that will allow you to “upload” a file to be deployed on the server.
The basics of a Java web application are outside the scope this conversation, but, in simplest terms, a Java web application is an application that is accessible via a browser. To the end user it looks just like a website, but the content is dynamic, not static. Assuming users have knowledge of a web application, Apache Tomcat is one of many options for serving a dynamic web site.
Apache Tomcat is better than most solutions that are available, as it is very fast, and very lightweight.
WebLogic, Wildfly, JBoss, Jetty, Undertow, and WebSphere are just a few of the other Servlet implementations that will serve Java content to the end user. Weblogic and Websphere are proprietary software components, but include hefty price tags for licensing and support. Wildfly, JBoss, Jetty, and Undertow are just a few of the open source solutions available to the public.
The difference between all these containers and Tomcat? Tomcat is not a full EE container. This will cause problems if you are attempting to deploy an application with a lot of EE functionality. There are components available to assist with every bit of functionality that would normally be used in an Enterprise application.
Some applications will require a setup that implements the JavaEE specification, and Tomcat does not. The EE specification has a lot of features, as does Tomcat, but the fact that Tomcat does not implement this specification is not necessarily a bad thing.
Using Apache HTTP Server, Apache Tomcat, and PostgreSQL enables users the ability to construct a 100% free and 100% reliable infrastructure to serve content. There is no reason to pay for these components. Some of the “for-pay” products might have better documentation (although Tomcat’s documentation is amazing,) and better graphic user interfaces for management, however, these are not reasons to discount using Tomcat.
For those who want to use Tomcat for enterprise applications, there is an EE implementation of Tomcat, called Apache TomEE. TomEE is a wrapper that wraps TomEE with full EE stack functionality.
One of the major differences between open source and proprietary “for-pay” software is support. However, OpenLogic has supported a number of opensource projects, like Tomcat, professionally for more than a decade. Using “for-pay” software, with outrageous license renewal fees, is not worth the cost.
Want to learn more about how OpenLogic can support your open source web application stack?
Talk With an Expert
Looking for additional reading on open source web application technologies? These resources are worth a look.
Enterprise Solutions Architect, OpenLogic by Perforce
Andrew has been working in the IT industry since 1996, ranging from hardware and networking to application development. Andrew’s #1 specialty is Apache Tomcat, and he is recognized in the Tomcat community as a subject matter expert, assisting the Tomcat open source project in many ways.