Our Spring training begins with Spring Setup/Configuration then instructs you through the Registraion, Login, Security and Forms processing modules.
Technologies involved: Spring, Maven, Hibernate, Annotations, JSTL, JSP, Cloud Services and MySQL

Setup and Configuration

Prerequisites                                       Maven
Spring Source Tool Suite                 vFabric tcServer
Spring Templates                               Creating a Spring MVC project
Creating a Spring MVC project    Deploying the WAR

Registration

In this lesson we will create a registration JSP page using the JSP Standard Tag Library. The registration process will trap for form field entry errors and duplicate records in the database before comitting a valid record to a MySQL cloud services database.

Login

Once the registration is successful we will create a login JSP using JSTL that uses the registration information to login to an application. We will create a user session object that will be used throughout the application.

Security

Spring security targets two main areas of web application - authentication and authorization. Authentication is the process of establishing a principal is who they claim to be. Authorization refers to the process of deciding whether a principal is allowed to perform an action within your application.

As an added feature we will also cover LDAP integration with the Spring security module.

Forms Processing

In this lesson we show you how to do form handling by using annotations in a Spring MVC application.

We will review the differences between the SimpleFormController, where you can initialize the command object for binding in the formBackingObject() method and in annotation-based, you can do the same by annotated the method name with @RequestMapping(method = RequestMethod.GET).

In SimpleFormController, the form submission is handle by the onSubmit() method. In annotation-based, you can do the same by annotated the method name with @RequestMapping(method = RequestMethod.POST).

In SimpleFormController, usually you put the reference data in model via referenceData() method, so that the form view can access it. In annotation-based, you can do the same by annotated the method name with @ModelAttribute.

In SimpleFormController, you define the binding or register the custom property editor via initBinder() method. In annotation-based, you can do the same by annotated the method name with @InitBinder. \

In SimpleFormController, you have to register and map the validator class to the controller class via XML bean configuration file, and the validation checking and work flows will be executed automatically. In annotation-based, you have to explicitly execute the validator and define the validation flow in the @Controller class manually.