Tech moves fast! Stay ahead of the curve with Techopedia!
Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.
Container, in the context of Java development, refers to a part of the server that is responsible for managing the lifecycle of Web applications. The Web applications specify the required lifecycle management with the help of a contract presented in XML format. The Web container cannot be accessed directly by a client. Rather, the server manages the Web container, which in turn manages the Web application code.
The container is an important component of Web applications in Java-based J2EE technology. It is responsible for maintaining the individual components on the server side, which include Java servlets, Java server pages and Java server faces. How the services will be provided and accessed is determined by a contract, which is an agreement between the Web application and the container. This provides a considerable amount of security in the J2EE framework because the client applications are unaware of the existence of the container and therefore it cannot be accessed directly. Thus, the Web container is responsible for initializing Web application components and invoking client requests on the components.