You are previewing Spring MVC: A Tutorial.
O'Reilly logo
Spring MVC: A Tutorial

Book Description

Spring MVC is a module in the Spring Framework (or Spring for short) for rapidly developing web applications. The MVC in Spring MVC stands for Model-View-Controller, a design pattern widely used in Graphical User Interface (GUI) development. This pattern is not only common in web development, but is also used in desktop technology like Java Swing. Sometimes called Spring Web MVC, Spring MVC is one of the most popular web frameworks today and a most sought-after skill. This book is for you if you want to learn how to develop Java-based web applications with Spring MVC.

Table of Contents

  1. Introduction
    1. The Hypertext Transfer Protocol (HTTP)
    2. Servlet and JSP Overview
    3. About This Book
    4. Downloading the Sample Applications
  2. Chapter 1: The Spring Framework
    1. XML-Based Spring Configuration
    2. Using the Spring IoC Container
    3. Summary
  3. Chapter 2: Model 2 and the MVC Pattern
    1. Model 1 Overview
    2. Model 2 Overview
    3. Model 2 with A Servlet Controller
    4. Isolating Code in Controller Classes
    5. Validators
    6. The Back End
    7. Summary
  4. Chapter 3: Introduction to Spring MVC
    1. The Benefits of Spring MVC
    2. Spring MVC DispatcherServlet
    3. The Controller Interface
    4. Your First Spring MVC Application
    5. The View Resolver
  5. Chapter 4: Annotation-Based Controllers
    1. Spring MVC Annotation Types
    2. Writing Request-Handling Methods
    3. Using An Annotation-Based Controller
    4. Dependency Injection with @Autowired and @Service
    5. Redirect and Flash Attributes
    6. Request Parameters and Path Variables
    7. @ModelAttribute
    8. Summary
  6. Chapter 5: Data Binding and the Form Tag Library
    1. Data Binding Overview
    2. The Form Tag Library
    3. Data Binding Example
    4. Summary
  7. Chapter 6: Converters and Formatters
    1. Converters
    2. Formatters
    3. Choosing Between Converters and Formatters
    4. Summary
  8. Chapter 7: Validators
    1. Validation Overview
    2. Spring Validators
    3. A Spring Validator Example
    4. JSR 303 Validation
    5. A JSR 303 Validator Example
    6. Summary
  9. Chapter 8: The Expression Language
    1. The Expression Language Syntax
    2. Accessing JavaBeans
    3. EL Implicit Objects
    4. Using Other EL Operators
    5. Configuring the EL in JSP 2.0 and Later Versions
    6. Summary
  10. Chapter 9: JSTL
    1. Downloading JSTL
    2. JSTL Libraries
    3. General-Purpose Actions
    4. Conditional Actions
    5. Iterator Actions
    6. URL Related Actions
    7. Formatting Actions
    8. Functions
    9. Summary
  11. Chapter 10: Internationalization
    1. Locales
    2. Internationalizing Spring MVC Applications
    3. Summary
  12. Chapter 11: File Upload
    1. Client Side Programming
    2. The MultipartFile Interface
    3. File Upload with Commons FileUpload
    4. File Upload with Servlet 3 or Later
    5. Upload Clients
  13. Chapter 12: File Download
    1. File Download Overview
    2. Example 1: Hiding A Resource
    3. Example 2: Preventing Cross-Referencing
    4. Summary
  14. Appendix A: Tomcat
    1. Downloading and Configuring Tomcat
    2. Starting and Stopping Tomcat
    3. Defining A Context
    4. Defining A Resource
    5. Installing SSL Certificates
  15. Appendix B: Servlets
    1. Servlet API Overview
    2. Servlet
    3. Writing A Basic Servlet Application
    4. ServletRequest
    5. ServletResponse
    6. ServletConfig
    7. ServletContext
    8. GenericServlet
    9. HTTP Servlets
    10. Working with HTML Forms
    11. Using the Deployment Descriptor
  16. Appendix C: JavaServer Pages
    1. An Overview of JSP
    2. Comments
    3. Implicit Objects
    4. Directives
    5. Scripting Elements
    6. Actions
    7. Error Handling
    8. Summary
  17. Appendix D: The Deployment Descriptor
    1. Deployment Descriptor Overview
    2. Deployment
    3. Web Fragments
    4. Summary