Previous Section
 < Day Day Up > 
Next Section


Summary

The primary focus of this chapter is to present the readers with the Java-based Enterprise Web development technologies, also known as J2EE. The chapter started with an introduction of the topics that are discussed here, including servlets, Java Server Pages, Jakarta Struts framework, and Enterprise JavaBeans. It is really an ambitious effort to pool these topics together and provide a comprehensive discussion as a single point of reference for the readers. Throughout the chapter, several process diagrams are designed to describe the interaction between different elements in these technologies, and a number of screenshots are provided to make it easier to understand.

The first topics discussed were servlets and Java Server Pages, the basic features, the interaction between the Servlet/JSP engine and these components, the life of servlets, and scope of variables and objects defined in the application, such as the request, session, page, and servlet context level scopes. The discussion continued with an overview of Java Server Pages, the life cycle of a JSP page, and the differences between servlets and JSPs. The different JSP programming elements such as expressions, scriptlets, and directives are discussed at great depth, and examples are provided. The differences between the two types of including external pages, and using applets as well as JavaBeans within JSP pages are discussed. The last topic in JSP pages was on developing and using custom tags and their productivity enhancement features.

Next, a high-level presentation of the open source Jakarta Struts package was given, with an emphasis on the Model 2 (or MVC) architecture. The deployment descriptor file and Struts configuration file and their contents were discussed, and it was explained how the controller servlet takes control of the Web application in distributing responsibilities across the different pieces of the MVC components.

The last topic in the chapter was Enterprise JavaBeans. Considerable effort has been made to explain the concepts involved, the component parts of this framework, and their interrelationships. The stateless session beans, stateful session beans, container-managed persistent entity beans, bean-managed persistent entity beans, and the message-driven beans are all discussed in depth, with full explanation of the interfaces and the associated bean implementations. The participant roles in EJB development and the features of the application server are also discussed. At the end, two example applications are built, one with the session beans, and the other implementing the entity beans.



Previous Section
 < Day Day Up > 
Next Section