Spring MVC: Beginner's Guide - Second Edition

Unleash the power of the latest Spring MVC 4.x to develop a complete application

Spring MVC: Beginner's Guide - Second Edition

This ebook is included in a Mapt subscription
Amuthan Ganeshan

4 customer reviews
Unleash the power of the latest Spring MVC 4.x to develop a complete application
$0.00
$30.60
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781785880636
Paperback350 pages

Book Description

Spring MVC helps you build flexible and loosely coupled web applications. The Spring MVC Framework is architected and designed in such a way that every piece of logic and functionality is highly configurable. Also, Spring can integrate effortlessly with other popular web frameworks such as Struts, WebWork, Java Server Faces, and Tapestry.

The book progressively teaches you to configure the Spring development environment, architecture, controllers, libraries, and more before moving on to developing a full web application. It begins with an introduction to the Spring development environment and architecture so you're familiar with the know-hows. From here, we move on to controllers, views, validations, Spring Tag libraries, and more. Finally, we integrate it all together to develop a web application. You'll also get to grips with testing applications for reliability.

Table of Contents

Chapter 1: Configuring a Spring Development Environment
Setting up Java
Configuring a build tool
Installing a web server
Configuring a development environment
Creating our first Spring MVC project
Spring MVC dependencies
A jump-start to MVC
The Dispatcher servlet
Deploying our project
Summary
Chapter 2: Spring MVC Architecture – Architecting Your Web Store
Dispatcher servlet
Understanding the Dispatcher servlet configuration
Servlet mapping versus request mapping
Web application context
View resolvers
Understanding the web application context configuration
Model View Controller
Overview of the Spring MVC request flow
The web application architecture
The Domain layer
The Persistence layer
The Service layer
An overview of the web application architecture
Summary
Chapter 3: Control Your Store with Controllers
The role of a Controller in Spring MVC
Defining a Controller
Default request mapping method
Handler mapping
Using URI template patterns
Using matrix variables
Understanding request parameters
Summary
Chapter 4: Working with Spring Tag Libraries
The JavaServer Pages Standard Tag Library
Serving and processing forms
Customizing data binding
Externalizing text messages
Summary
Chapter 5: Working with View Resolver
Resolving Views
RedirectView
Flash attribute
Serving static resources
Multipart requests in action
Using ContentNegotiatingViewResolver
Working with HandlerExceptionResolver
Summary
Chapter 6: Internalize Your Store with Interceptor
Working with interceptors
LocaleChangeInterceptor - internationalization
Mapped interceptors
Summary
Chapter 7: Incorporating Spring Security
Using Spring Security
Summary
Chapter 8: Validate Your Products with a Validator
Bean Validation
Custom validation with JSR-303/Bean Validation
Spring validation
Summary
Chapter 9: Give REST to Your Application with Ajax
Introduction to REST
Handling web services in Ajax
What just happened?
Summary
Chapter 10: Float Your Application with Web Flow
Working with Spring Web Flow
Understanding flow definitions
Understanding checkout flow
Summary
Chapter 11: Template with Tiles
Enhancing reusability through Apache Tiles
Summary
Chapter 12: Testing Your Application
Unit testing
Integration testing with the Spring Test context framework
Summary
Thank you readers!

What You Will Learn

  • Familiarize yourself with the anatomy of the Spring 4.X development environment
  • Understand web application architecture and the Spring MVC request flow
  • Integrate bean validation and custom validation
  • Use error handling and exception resolving
  • Get to grips with REST-based web service development and Ajax
  • Test your web application

Authors

Table of Contents

Chapter 1: Configuring a Spring Development Environment
Setting up Java
Configuring a build tool
Installing a web server
Configuring a development environment
Creating our first Spring MVC project
Spring MVC dependencies
A jump-start to MVC
The Dispatcher servlet
Deploying our project
Summary
Chapter 2: Spring MVC Architecture – Architecting Your Web Store
Dispatcher servlet
Understanding the Dispatcher servlet configuration
Servlet mapping versus request mapping
Web application context
View resolvers
Understanding the web application context configuration
Model View Controller
Overview of the Spring MVC request flow
The web application architecture
The Domain layer
The Persistence layer
The Service layer
An overview of the web application architecture
Summary
Chapter 3: Control Your Store with Controllers
The role of a Controller in Spring MVC
Defining a Controller
Default request mapping method
Handler mapping
Using URI template patterns
Using matrix variables
Understanding request parameters
Summary
Chapter 4: Working with Spring Tag Libraries
The JavaServer Pages Standard Tag Library
Serving and processing forms
Customizing data binding
Externalizing text messages
Summary
Chapter 5: Working with View Resolver
Resolving Views
RedirectView
Flash attribute
Serving static resources
Multipart requests in action
Using ContentNegotiatingViewResolver
Working with HandlerExceptionResolver
Summary
Chapter 6: Internalize Your Store with Interceptor
Working with interceptors
LocaleChangeInterceptor - internationalization
Mapped interceptors
Summary
Chapter 7: Incorporating Spring Security
Using Spring Security
Summary
Chapter 8: Validate Your Products with a Validator
Bean Validation
Custom validation with JSR-303/Bean Validation
Spring validation
Summary
Chapter 9: Give REST to Your Application with Ajax
Introduction to REST
Handling web services in Ajax
What just happened?
Summary
Chapter 10: Float Your Application with Web Flow
Working with Spring Web Flow
Understanding flow definitions
Understanding checkout flow
Summary
Chapter 11: Template with Tiles
Enhancing reusability through Apache Tiles
Summary
Chapter 12: Testing Your Application
Unit testing
Integration testing with the Spring Test context framework
Summary
Thank you readers!

Book Details

ISBN 139781785880636
Paperback350 pages
Read More
From 4 reviews

Read More Reviews