Chapter 17. Java 2, Enterprise Edition

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, the J2EE outlines how these technologies work together to provide a complete solution. 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. We have already seen both types of glue. First, the JNDI enterprise naming context (ENC) is used to standardize the way components look up resources they need. We have already seen 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—has been 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 ...

Get Enterprise JavaBeans, Third 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.