Tomcat Jboss Glassfish Three common web container comparisons

Source: Internet
Author: User
Tags glassfish jboss

Tomcat Jboss Glassfish Three common web container comparison <br>
First, Reason:
The new company platform is pure Java architecture, useful to Java Web (JSP), Java Business (EJB), Nginx, Websphere MQ, MySQL. You know that Java is running in a container,

The GlassFish container is used for the operation of the EJB.

What is EJB? EJB is a server-side component model that can deploy distributed applications. The Java EE specification says that the Enterprise Java Bean (EJB) component is a business component running on the server side;

In addition, Java servlet and Java Server Pages (JSP) are Web components that run on the server side.

So what's the difference between a common Web container (application server)? Here's the slow way.

Second, Detailed:
1. Web Container

The Web container is a specification for service invocation, and the Java EE employs a number of container and component technologies to build tiered enterprise applications. In the Java EE specification, the corresponding Web container and EJB container, etc.

The Web container provides an environment for the application components (JSPs, Servlets) in which the JSP, servlet directly deals with environment variables in the container without having to focus on other system problems.

The Web container is more about HTTP requests, and the EJB container is not, it's more about dealing with other database services.

2. Web server

The Web server can handle the HTTP protocol, and when the Web server receives an HTTP request, it returns an HTTP response.

Web servers can jump to requests for static pages or images, or delegate dynamic responses to other programs, such as CGI, JSP, Servlet, ASP, JavaScript, or other server-side technologies.

The Web server simply provides an environment that can perform server-side environments and return responses, and does not involve other technologies.

1) Apache

is a simple HTTP server, fast, in large sites, often with the application server deployment, only support static pages.

2) Nginx

is a well-known HTTP server, fast and supports load balancing.

3. Application Server (Web container)

As an application server, it is required that commercial logic can be exposed to client applications through various protocols, including the HTTP protocol. The application uses business logic just as you would call a method or procedure for an object.

1) Tomcat

Tomcat is just an HTTP server, a Java Web server supported by Apache, and an executor of the Servlet/jsp API, the so-called servlet container, which does not support EJB or JMS.

Relatively lightweight and less functional than JBoss, it does not fully support the latest Java EE standards for simpler Web applications.


JBoss is an open source Java EE application Server, which is not only a servlet container, but also an EJB container, it provides more out-of-the-box features and more, it fully implements the EE 6.

3) Glassfish

GlassFish is the official Java EE container developed by Oracle, and supports both Servlets and EJBS, supports the latest features, has its own web container, supports clusters, and supports hot deployment.

Third, the difference and selection:
1. Difference:

Tomcat is just an HTTP server and Java servlet container. JBoss and GlassFish are complete Java EE application servers, including the EJB container and all other features of the stack.

On the other hand, Tomcat has a lighter memory footprint (about 60-70 MB), while those Java EE servers have a weight of hundreds of trillion. Tomcat for simple Web applications or for using a spring

Applications that do not require a full Java EE Server framework are very popular. Managing the Tomcat server can be said to be easier because there are fewer moving parts.

However, for applications that do require a complete Java EE stack (or at least more parts that can be easily pinned to Tomcat) ... JBoss and GlassFish are the two most popular open source products

(The third is Apache Geronimo, which builds the free version of IBM WebSphere on it). JBoss has a larger and deeper user community, and a more mature code base.

However, JBoss lags far behind GlassFish in implementing the current Java EE specification. In addition, for those like GUI based management system ... The GlassFish management console is very smooth,

And most of the management in JBoss is through the command line and text editor. GlassFish comes directly from Sun/oracle and has all the advantages. JBoss is not controlled by Sun/oracle and has all the benefits it can offer.

Original English: Http://

Tomcat is merely an HTTP server and Java servlet container. JBoss and GlassFish is full-blown Java EE application servers, including an EJB container

And all the other features of this stack. On the other hand, Tomcat have a lighter memory footprint (~60-70 MB), while those Java EE servers weigh

Hundreds of megs. Tomcat is very popular for simple Web applications, or applications using frameworks such as Spring that does not require a Full Java EE server.

Administration of a TOMCAT server is arguably easier, as there is fewer moving parts.

However, for applications that does require a full Java EE stack (or at least more pieces that could easily is bolted-on to Tomcat) ... JBoss and GlassFish are

Both of the most popular open source offerings (the third one are Apache Geronimo, upon which the free version of IBM WEBSPH Ere is built). JBoss has a larger

And deeper user community, and a more mature codebase. However, JBoss lags significantly behind GlassFish in implementing of the current Java EE specs.

Also, for those who prefer a gui-based admin system ... GlassFish ' s admin Console is extremely slick, whereas most administration in JBoss are done with a

command-line and text editor. GlassFish comes straight from sun/oracle, with all the advantages so can offer. JBoss is not under the control of Sun/oracle,

With all the advantages-can offer.

2. Selection:

Based primarily on business needs and application sizing, if simple Web applications do not need to support features such as EJB or JMS, choose the easy-to-use Tomcat.

If you need more Java features, such as EJB recommends choosing GlassFish as a full-featured server.

For JBoss and GlassFish, it is recommended to choose GlassFish, because the official production, to achieve the current Java EE more timely.

Tomcat Jboss Glassfish Three common web container comparisons

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.