I am new to java web technology. It is said that java web applications have two containers:
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?
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
Some app servers
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With