Chapter 12. Web MVC Framework
Spring provides a web framework based on the Model-View-Controller (MVC) paradigm. Although it is similar in some ways to other popular MVC frameworks such as Struts and WebWork, we believe that Spring Web MVC provides significant advantages over those frameworks. Spring MVC provides out-of-the-box implementations of workflow typical to web applications. It is highly flexible, allowing you to use a variety of different view technologies. It also enables you to fully integrate with your Spring-based, middle-tier logic through the use of the Dependency Injection features you've already seen.
You can use Spring Web MVC to make services created with other parts of Spring available to your users by implementing web interfaces. This chapter gives you an overview of the architecture of Spring's Web MVC framework as well as the implementation of concepts such as model, view, and controller. After studying some of the most important infrastructural components, we'll continue to guide you through a couple of practical scenarios in which we'll use most of the components explained earlier.
After reading this chapter you will have learned the basics about workflow in a Spring-based web application. You'll be able to implement your own controllers handling common tasks such as form submissions, validation, data binding, and uploading files. You will also have an overall insight into all of Spring's web-related functionality, including the way Spring MVC enforces best ...
Get Professional Java™ Development with the Spring Framework 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.