• Sales 0808 1686 777
  • Support 0333 0142 700

Apache Tomcat: your pure Java web server

What is Apache Tomcat?

Apache Tomcat, also known as Tomcat Server, proves to be a popular choice for web developers building and maintaining dynamic websites and applications based on the Java software platform.  

So what makes Tomcat different from other web or application servers, and why should you use it for your Java-based projects? Read on to find out.

What is Apache Tomcat?

Strictly speaking, Tomcat isn’t a web server like Apache HTTPS Server or NGINX.

Developed as an open-source project by the Apache Software Foundation (ASF), it’s a Java Servlet container, or web container, that provides the extended functionality to interact with Java Servlets, while also implementing several technical specifications of the Java platform: JavaServer Pages (JSP), Java Expression Language (Java EL) and WebSocket.

But what is a Java Servlet? This is software that enables a web server to handle dynamic Java-based web content using the HTTP protocol. JSP is a similar technology that allows developers to create dynamic content using HTML or XML documents. In terms of their ability to enable dynamic content, Java Servlets and JSP are broadly comparable to PHP or ASP.NET, just based on the Java programming language.

By bringing all these Java-based technologies together, Tomcat offers a “pure Java” web server environment for running applications built on the Java programming language.

Apache Tomcat vs Apache HTTP Server

Comparisons between Apache Tomcat and Apache HTTPS Server can be confusing, since both have Apache in their name, and both are developed by the ASF. But the truth is that they’re two very different software packages.

While Apache is a traditional HTTPS web server, optimised for handling static and dynamic web content (very often PHP-based), it lacks the ability to manage Java Servlets and JSP. Tomcat, on the other hand, is almost totally geared towards Java-based content. In fact, Tomcat was originally developed as a means to provide the JSP functionality that Apache lacked.

Even with this in mind, a comparison between Tomcat and Apache doesn’t come down to a direct competition. This is because it’s completely viable to run them side by side. So in projects involving both Java and PHP-based content, for example, it makes sense to have Apache handling most of the static and dynamic content, while Tomcat takes care of the JSP.

On its own however, Tomcat isn’t particularly efficient as a traditional HTTP server, so Apache is a much better choice for dynamic websites built solely with a language like PHP. But of course, when it comes to sites based entirely on JSP, Tomcat is the indisputable leader of the gang.

Get started with Tomcat on cloud hosting

Need Apache Tomcat for your own applications that use Java technologies? Our CloudNX cloud hosting platform now supports Tomcat and Java as part of a pre-configured, managed software stack. Alternatively, the CloudNX Root Server option gives you full control of your virtual machines to implement any web server or programming language of your choice.

Neal Thoms's picture

Neal Thoms

Author As a content creator for Fasthosts, Neal’s main focus is cloud technology and how it’s transforming everything we do online. He’s worked in the web hosting industry for over five years.