Chapter 20. Java EE

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

At the risk of spoiling the story, Java EE provides three kinds of “glue” to make it easier for components to interact. First, the JNDI Enterprise Naming Context (ENC) is used to standardize the way components look up and inject 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 injection and the ENC to reference and find resources. Second, the use of deployment descriptors and annotations is extended to servlets and JSP. Java servlets and JSP pages can mix and match the use of annotations or XML deployment descriptors to define their relationship to their environment. Third, Java EE provides additional packaging formats, beyond the basic EJB JAR, so that entire applications can be bundled in reusable, deployable units.

Servlets

The servlet specification defines a ...

Get Enterprise JavaBeans 3.0, 5th 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.