Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Spring MVC Beginner's Guide
  • Table Of Contents Toc
Spring MVC Beginner's Guide

Spring MVC Beginner's Guide

By : Ganeshan
4.3 (30)
close
close
Spring MVC Beginner's Guide

Spring MVC Beginner's Guide

4.3 (30)
By: Ganeshan

Overview of this book

A step-by-step pragmatic approach to web application development using Spring MVC, with relevant screenshots and concise explanations. This book is aimed at helping Java developers who want to teach themselves Spring MVC, even if they have no previous experience with Spring MVC. It would be helpful to have a bit of familiarity with basic servlet programming concepts, but no prior experience is required.
Table of Contents (14 chapters)
close
close
13
Index

Chapter 6. Intercept Your Store with Interceptor

In all the previous chapters, we have only learned how to map a request to a controller method. Once the request reaches the controller method, we execute some logic and return a logical view name that can be used by the view resolver to resolve views. However, what if we want to execute some logic before the actual request process is performed? Similarly, what if we want to execute another instruction before dispatching the response?

The Spring MVC interceptor can be used to intercept the actual request and response. Interceptors are a special web programming technique where one can execute a certain piece of logic before or after a web request is processed. In this chapter, we are going to learn more about the interceptor. We will learn the following:

  • How to configure an interceptor
  • How to add internalization support
  • Data auditing using an interceptor
  • Conditional redirecting using an interceptor
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Spring MVC Beginner's Guide
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon