In earlier posts we have seen How Spring MVC Path Variable work. There is one issue with the @PathVariable. The last @PathVariable in the URL truncates the value passed after the . (dot). In this p
Spring MVC Redirect Views Example
In a Spring application you may need to redirect to a view for many reasons 1. On a form submission, a controller will get the POST data to process. If after processing the data we internally forwa
Spring MVC @RequestHeader example
Spring MVC has a annotation @RequestHeader that can be used to get the details about the HTTP request headers. Lets see some examples or Spring MVC @RequestHeader. Single @Reque
Using Themes in Spring MVC
Theme is a collection of static resources, normally style sheets and images, that affect the look and feel of an application. Themes are helpful in enriching user experience. In this post we will s
Spring MVC Ajax Handling using JQuery
When working on a web application, we need to deal with many Ajax requests. With the use of JQuery working with AJax (post and gets) in Spring MVC is very easy. Let us see some code samples of Spri
Spring MVC view controller Example
View controllers are used to forward a request to the views without any controllers written either using ViewControllerRegistry or <mvc:view-controller> element. Normally i
Spring MVC Building URIs Example
Spring MVC provides ways to build and encode URI’s from Controller, methods and views. Using UriComponentsBuilder and UriComponents we can create uri. [cray
Spring MVC Internationalization and Localization
For a web app to be able to used across languages/regions without much of major changes they must support Internationalization and Localization. In this post we will see example of Spring MVC Inter
Spring MVC File Upload Max Size Validation
In one of the earlier posts we have seen Spring MVC File Upload Example. What happens if you have a specific requirement of not allowing users to upload file of over a specified limit? In simple ap
Spring MVC Matrix Variable Example
The URL can have name-value pairs within its path segment. To map these pairs correctly Matrix Variables can be used in Spring MVC. Lets see some of the Spring MVC Matrix Variable Examples and how