Java JEE Web Container, Application Server and Web Server Overview

Java JEE beginners are often confused by some terminologies. Such as Servlet Container, Application Server and Web Server. They are related technologies in java JEE but they has a lot of differences also. In this article we will tell you what difference between them and when should you use them.


Servlet container offers runtime environment and services to execute JSP and Servlet only. It dose not support other JEE components such as EJB, JNDI, JDBC and Transaction Services etc. So it is also called light weight container. Jetty and Apache Tomcat are the most popular and famous servlet containers both are open source and totally free.

Application Server is one step further than servlet container, it not only support JSP and Servlet but it also support other JEE key features such as EJB, JNDI, JDBC , Transaction and Security etc. It provide business level service by using Enterprise Java Beans. It also provide Database connection pooling. It is heavy weight container. Oracle WebLogic, IBM WebSphere, Redhat’s JBoss and Glassfish are all famous and popular application server.

Web Server just support static resources like html, css, javascript and images. It only support HTTP protocal services. The most popular two are Apache and IIS, IIS is used in Windows only while Apache is used in both Windows, Linux and Mac OS. Apache and Tomcat are often used together. Apache used to serve html pages and Tomcat serve JSP and Servlet.

When to use web, application and servlet containers?

Knowing the main difference among those three server, it’s not hard to determine when you should use them.

READ :   Servlet RequestDispatcher And SendRedirect

If you only support static web resources such as html, javascript and css, you only need to use web server, you can use Apache HTTPD or IIS.

If your Java EE application includes EJB, Message, JDBC Pool, JNDI etc, then you need to use application server such as WebSphere, JBoss or WebLogic.

If you want to support java web application which only use JSP or Servlet to produce dynamic web content, you need a servlet container, you can choose Apache Tomcat or Jetty.


By now you know all about the main differences between Java JEE Application Server , Web Server and Servlet Container. They are used for different purposes. But they can also used together when you develop Java JEE applications. You can use Apache HTTPD as the client tier while Tomcat as the web tier and JBoss as the business logic tier. This is called three tier java application structure. We will introduce more java and JEE technologies or code examples in subsequent articles. Please always come back to read our blogs for the tutorial you want to learn. Thanks a lot.

(Visited 51 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *