In the last chapter, we learned how to create JEE applications using EJBs. In this chapter, we are going to divert a bit from the core JEE specifications and learn Spring MVC.
Although this book is about JEE and Eclipse, and Spring MVC is not a part of JEE, it would be worthwhile to understand the Spring MVC framework. Spring MVC is a very popular framework for creating web applications and can be used with other JEE technologies, such as servlet, JSP, JPA, and EJBs.
JEE does support MVC out of the box, if you use JSF. Refer to Java Server Faces in Chapter 2, Creating a Simple JEE Web Application, for details. However, there is a difference in the design of JSF and Spring MVC. JSF is a component-based MVC framework. It is designed so that the user interface designer can create pages by assembling reusable components that are either...