Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Tomcat? A web container or EE container? [closed]

I am new to java web technology. It is said that java web applications have two containers:

  • Web container
  • EE container

What are these containers? And how do they collaborate?

Some say that Tomcat is a web container, whereas in some places it is said that Tomcat is an application server.What is Tomcat exactly?

If I say web container + EE container = Application server is it correct?

like image 818
DesirePRG Avatar asked Nov 18 '25 06:11

DesirePRG


2 Answers

Tomcat is just a Servlet container and also serves as a Web Server, that means it supports out-of-the-box Servlet API, JSF, Play framework, Spring (some set of features) and many others. On the other hand, Application Server is usually a superset of Servlet container which means that it contains all features that container has + all other Java EE capabilities like messaging, EJB, JTA, JavaMail, remoting and others.

So choice is mostly up to your requirements, however in the world of CDI, Servlet container should be sufficient for most applications (there is also transaction support from Java EE 7).

Some Servlet Containers

  • Apache Tomcat
  • Jetty

Some app servers

  • JBoss AS (now Wildfly)
  • Oracle WebLogic
  • Glassfish
like image 171
Petr Mensik Avatar answered Nov 20 '25 20:11

Petr Mensik


Tomcat is a Servlet container. It's not a full fledged Java EE compliant Application Server, so it doesn't support for example EJBs or JMS out of the box.

like image 30
Kayaman Avatar answered Nov 20 '25 20:11

Kayaman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!