B.1. Designing with J2EE
Each of the three main components of J2EE discussed previously is run in the confines of a container. For JSP and Servlets, this container may be a Web server. For EJB, it's an EJB container (possibly also a Web server). The container is responsible for instantiating and invoking the operations on the classes of each of the J2EE components. For instance, the javax.servlet.Servlet interface defines various methods that the Servlet container will invoke, but the container actually invokes our realization of this interface, albeit indirectly. This is a prime example of J2EE compliance with the Open-Closed Principle.
If we were to attempt to develop a Servlet that didn't adhere to the Servlet API, we couldn't use it within ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access