Saturday, April 8, 2017

Difference between Spring Container and Servlet Container?

Spring container is responsible for creating the objects, wiring them together, configuring them, and managing their complete lifecycle from creation till destruction. The Spring container uses dependency injection (DI) to manage the components that make up an application. These objects are called Spring Beans.
While Servlet container is basically web server or application server one who is responsible for creating and maintaining life cycle of a servlet like init, service, destroy in a nut shell. It has other functionalities as well in addition to maintaining lifecycle of a servlet.

No comments: