Spring MVC Validator Example

Spring MVC provides a Validator interface that we can use to validate objects. In this lesson, we will see how to perform validation within Spring MVC using the Validator interface.   1. Technologies used Spring 4.2.0.RELEASE Maven 3.0.5 Eclipse 4.5 JDK 1.6 Tomcat 7.0…

Spring MVC data binding list example

In this tutorial, we will see how to perform data binding to a list; we are going to map fields in a page form to a list elements in a form backing object.   1. Technologies used Spring 4.2.0.RELEASE Maven 3.0.5 Eclipse 4.4 JDK 1.7 Tomcat…

Spring MVC URI template example

A URI Template is a string containing one or more variables which can be replaced by values to obtain a URL. URI Templates are used to map requests with @RequestMapping when implementing controllers. In this example, we will see three cases…

Spring MVC Form Handling Example

  In this example, we will see how to handle a form submission in Spring MVC using a controller.   1.  Project structure   2.  Create the controller File : UserController   The method initForm() is mapped to  GET requests on…

Spring MVC InternalResourceViewResolver

  In Spring MVC, view resolvers allow us to render models in a browser, they provide a mapping between logical view name and the actual view. InternalResourceViewResolver is used to resolve a logical view name to an internal resource view, most…

Spring MVC Tiles Integration Example

  Apache Tiles is a templating framework used in MVC applications to simplify the development of user interfaces. It allows to define page fragments which are common to all application pages, we can then include these fragments to any other…

Spring MVC RequestMapping Annotation

  In Spring MVC, @RequestMapping annotation is used to map client requests onto an entire class or a specific method. In this example, we will see some common uses of @RequestMapping annotation.   1. Technologies used Spring 3.2.8.RELEASE Maven 3.0.5 JDK…

Spring MVC Google Places Autocomplete

In this tutorial, we will use Google Places API with Spring MVC in a simple web application to provide an input to search for locations with an autocomplete dropdown.   1. Technologies used Spring 3.2.8.RELEASE Google Places API JQuery-1.10.2  …

Spring MVC Restful Service

Spring 3 MVC supports RESTful web services in its MVC layer. In this tutorial, we will use Spring MVC annotations to build RESTful web application.   1. Technologies used Spring 3.2.8.RELEASE Maven 3.0.5 Eclipse 4.2 JDK 1.6 Tomcat 6.0  …