Where do all the J2EE components exist in a distributed application?
J2EE is a true n-tier architecture; however, the different components developed on the J2EE framework can be grouped into server-side and client-side components. Applets and application clients are basically pure client-side components and execute in a virtual machine on the client machine. Applets execute in a browser, while applications can execute in other client-side processes. J2EE offers two types of Web components: servlets and JSPs. The purpose of both types of components is the same: to serve up dynamic content to Web clients. In fact, JSPs are compiled into servlets during execution. This means that JSPs and servlets get requests from Web clients and serve back HTML (or XML). Servlets and JSPs provide the connectivity between the client- and server-side components in a J2EE application. To generate the right response, they can communicate with back-end data sources through JDBC, RMI, JMS, or JavaMail, as well as to middle tier Java components, namely, EJBs. In turn, EJBs can