Types of Containers

Standalone

Typically java-based web servers where the main web server
and the servlet container are integral parts of the same program.

An example is Tomcat running by itself.

All Requests
Servlet Container Process Space (JVM)
Default Handler
Servlet Handler
JSP Handler

     

In-process

The main web server and the servlet container are different programs,
but the container runs within the address space of the main server as a plug-in.

An example is Tomcat running inside Apache Web Server.

All Requests
Web Server Process Space
Default Handler
Servlet Container Process (JVM)
Servlet Handler
JSP Handler

Out-of-process

The main web server and the servlet container are different programs and run
in separate processes. A plug-in is used to communicate with the servlet container.

An example is Tomcat running as a separate process configured to receive
requests from ApacheWeb Server. Apache loads a plug-in to communicate with Tomcat.

All Requests
Web Server Process Space
Default Handler
mod_jk Plug-In
Servlet and JSP

Requests
Servlet Container Process Space (JVM)
Servlet Handler
JSP Handler