Introduction to Spring MVC HandlerInterceptor 1. Introduction In this tutorial we’ll focus on understanding the Spring MVC HandlerInterceptor and how to use it correctly. _ _ 2. Spring MVC Handler And in order to understand the interceptor, let’s take a step back and look at the HandlerMapping. This maps a… Continue Reading spring-mvc-handlerinterceptor

Spring MVC Content Negotiation 1. Overview This article describes how to implement content negotiation in a Spring MVC project. Generally, there are three options to determine the media type of a request: Using URL suffixes (extensions) in the request (eg .xml/.json) Using URL parameter in the request (eg ?format=json) Using… Continue Reading spring-mvc-content-negotiation-json-xml

Guide to DeferredResult in Spring 1. Overview In this tutorial, we’ll look at how we can use the DeferredResult class in Spring MVC to perform asynchronous request processing. Asynchronous support was introduced in Servlet 3.0 and, simply put, it allows processing an HTTP request in another thread than the request receiver thread.… Continue Reading spring-deferred-result

Debugging the Spring MVC 404 “No mapping found for HTTP request” Error 1. Introduction Spring MVC is a traditional application built using the Front Controller Pattern. DispatcherServlet, which acts as the front controller, is responsible for routing and request processing. As with any web application or website, Spring MVC returns… Continue Reading spring-mvc-404-error