Overview
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 component (Jsp,servlet) in which jsp,servlet directly deals with the environment variables in the container without having to focus on other system issues.
The Web container is more about HTTP requests, and the EJB container is not, it's more about dealing with other database services.
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,servlets,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.
Apache
is a simple Web server, fast, in a large web site, often with the application server with the deployment, only support static Web pages.
Nginx
A well-known HTTP server that is extremely fast and supports load balancing.
Application Server
By definition, as an application server, it is required that commercial logic can be exposed to (expose) client applications through various protocols, including the HTTP protocol. The application uses business logic just as you would call an object's method or procedure (a function in a language).
Tomcat
Tomcat is only an HTTP server, and the executor of the Servlet/jsp API, the so-called servlet container, does not support EJB,JMS.
Relatively lightweight and less functional than JBoss, it does not fully support the latest Java EE standards for simpler Web applications and is easy to use.
Jboss
JBoss is an open source application server, and JBoss is different from Tomcat, which provides more out-of-the-box features and more, and it fully implements the Java 6.
So how to choose Tomcat or JBoss, if for large enterprises, JBoss provides the following additional features:
- JMS Messaging for Asynchronous integration
- Web Services engine (JAX-WS and/or JAX-RS)
- Management capabilities like JMX and a scripted administration interface
- Advanced Security, e.g Out-of-the-box integration and 3rd party directories
- EAR file instead of ' only ' WAR file support
- All of the other "great" Java EE features I can ' t remember:-)
Glassfish
Oracle develops an official Java container that supports the latest features and has its own web container (not tomcat).
Selection
Based on the size and requirements of the application, it is a good choice to choose the easy-to-use Tomcat if it is simply a simple application that does not require the support of the responsible EJB or JMS features. If you need more features of the Java EE, you need to consider using a full-featured server like JBoss.
Tomcat,jboss,glassfish and other Web container comparison selection