Spring MVC PathVariable truncate issue
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 post we will see the ways to
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 forward to request to another Controller,
Spring MVC @RequestHeader example
Spring MVC has a annotation [crayon-603f3fa1ef5fe850315545-i/] that can be used to get the details about the HTTP request headers. Lets see some examples or Spring MVC @RequestHeader. Single @RequestHeader @RequestHeader is used with a attribute value to specify the HTTP request header
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 see example of Using Themes in Spring MVC application.
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 Spring MVC Ajax Handling
Spring MVC view controller Example
View controllers are used to forward a request to the views without any controllers written either using [crayon-603f3fa1f0cb3992962034-i/] or [crayon-603f3fa1f0cbc407855552-i/] element. Normally in applications view-controllers are used in static cases when there is no Controller Logic (like getting data for dropdowns) to
Spring MVC Building URIs Example
Spring MVC provides ways to build and encode URI’s from Controller, methods and views. Using [crayon-603f3fa1f1cfa736619712-i/] and [crayon-603f3fa1f1d04144569500-i/] we can create uri. [crayon-603f3fa1f1d09839011992/] The UriComponents can also be build using individual components like hostName, port, path. [crayon-603f3fa1f1d0f818245343/] Spring MVC Building URI from
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 Internationalization(i18n) and Localization(L10n). Internationalization is a way of designing software’s
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 apps, you may end up getting
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 we can configure these variables in our