Need advice about which tool to choose?Ask the StackShare community!


+ 1
Apache Tomcat

+ 1
Add tool

Apache Tomcat vs GlassFish: What are the differences?

Apache Tomcat vs GlassFish

Apache Tomcat and GlassFish are two popular Java-based web application servers that provide a platform for deploying and running Java web applications. While they are both used for similar purposes, there are key differences between the two.

  1. Servlet and JSP Support: Apache Tomcat is primarily designed as a servlet container and supports only the Java Servlet and JavaServer Pages (JSP) technologies. In contrast, GlassFish is a full Java EE server and supports a wider range of Java EE technologies, including Enterprise JavaBeans (EJB), Java Naming and Directory Interface (JNDI), and Java Message Service (JMS).

  2. Scalability and Clustering: GlassFish offers superior scalability and clustering capabilities compared to Apache Tomcat. GlassFish supports high availability clustering, allowing multiple instances of the server to be deployed across multiple machines to handle increased traffic and provide failover.

  3. Administration and Monitoring: GlassFish provides a comprehensive administration console with a user-friendly web interface for managing and monitoring the server. The console allows for easy configuration of various server settings, monitoring of application performance, and the ability to deploy applications remotely. Apache Tomcat, on the other hand, requires manual configuration through XML files and lacks a dedicated administration console.

  4. Community and Support: Apache Tomcat has a vast and active community of developers and users, making it easy to find support, documentation, and extensions. GlassFish, while also having a community, is not as widespread as Apache Tomcat. This may affect the availability of third-party extensions and external support.

  5. Performance: Apache Tomcat is known for its lightweight nature and low memory footprint, making it ideal for small to medium-sized applications or instances with limited resources. GlassFish, being a full-featured Java EE server, requires more resources and may not be as efficient as Apache Tomcat in terms of performance.

  6. Compatibility and Standards: Apache Tomcat focuses on providing a simple and streamlined implementation of the Java Servlet and JSP Standards, ensuring compatibility with various Java web application frameworks. GlassFish, being a complete Java EE server, supports a broader set of standards and specifications, making it suitable for enterprise-level applications that require full Java EE compliance.

In summary, Apache Tomcat is lightweight, efficient, and ideal for small to medium-sized applications that primarily require servlet and JSP support. On the other hand, GlassFish is a robust Java EE server with superior scalability, administration tools, and support for a wider range of Java EE technologies, making it suitable for enterprise-level applications that require full Java EE compliance.

Decisions about GlassFish and Apache Tomcat

I was in a situation where I have to configure 40 RHEL servers 20 each for Apache HTTP Server and Tomcat server. My task was to 1. configure LVM with required logical volumes, format and mount for HTTP and Tomcat servers accordingly. 2. Install apache and tomcat. 3. Generate and apply selfsigned certs to http server. 4. Modify default ports on Tomcat to different ports. 5. Create users on RHEL for application support team. 6. other administrative tasks like, start, stop and restart HTTP and Tomcat services.

I have utilized the power of ansible for all these tasks, which made it easy and manageable.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of GlassFish
Pros of Apache Tomcat
    Be the first to leave a pro
    • 79
    • 72
    • 49
    • 1
      Spring web

    Sign up to add or upvote prosMake informed product decisions

    Cons of GlassFish
    Cons of Apache Tomcat
      Be the first to leave a con
      • 2
        Blocking - each http request block a thread
      • 1
        Easy to set up

      Sign up to add or upvote consMake informed product decisions

      - No public GitHub repository available -

      What is GlassFish?

      An Application Server means, It can manage Java EE applications You should use GlassFish for Java EE enterprise applications. The need for a seperate Web server is mostly needed in a production environment.

      What is Apache Tomcat?

      Apache Tomcat powers numerous large-scale, mission-critical web applications across a diverse range of industries and organizations.

      Need advice about which tool to choose?Ask the StackShare community!

      Jobs that mention GlassFish and Apache Tomcat as a desired skillset
      What companies use GlassFish?
      What companies use Apache Tomcat?
      See which teams inside your own company are using GlassFish or Apache Tomcat.
      Sign up for StackShare EnterpriseLearn More

      Sign up to get full access to all the companiesMake informed product decisions

      What tools integrate with GlassFish?
      What tools integrate with Apache Tomcat?

      Sign up to get full access to all the tool integrationsMake informed product decisions

      Blog Posts

      What are some alternatives to GlassFish and Apache Tomcat?
      It is a flexible, lightweight, managed application runtime that helps you build amazing applications. It supports the latest standards for web development.
      An application platform for hosting your apps that provides an innovative modular, cloud-ready architecture, powerful management and automation, and world class developer productivity.
      It Server is a drop in replacement for GlassFish Server Open Source Edition with quarterly releases containing enhancements, bug fixes and patches.
      JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
      Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
      See all alternatives