Chapter 17. J2EE

The specification for the Java 2 Enterprise Edition (J2EE) defines a platform for developing web-enabled applications that includes Enterprise JavaBeans, servlets, and JavaServer Pages (JSP). J2EE products are application servers that provide a complete implementation of the EJB, servlet, and JSP technologies. In addition, J2EE outlines how these technologies work together to provide a complete solution for developing applications. To help you understand J2EE, we must introduce servlets and JSP and explain the synergy between these technologies and Enterprise JavaBeans.

At the risk of spoiling the story, J2EE provides two kinds of “glue” to make it easier for components to interact. First, the JNDI enviroment naming context (ENC) is used to standardize the way components look up resources they need. We discussed the ENC in the context of enterprise beans; in this chapter, we will look briefly at how servlets, JSPs, and even some clients can use the ENC to find resources. Second, the use of deployment descriptors—in particular, the use of XML to define a language for deployment descriptors—is extended to servlets and JSP. Java servlets and JSP pages can be packaged with deployment descriptors that define their relationships to their environment. Deployment descriptors are also used to define entire assemblies of many components into applications.

Servlets

The servlet specification defines a server-side component model that can be implemented by web server ...

Get Enterprise JavaBeans, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.