Form submission

In a normal web application, the form is loaded upon clicking on a link by the user, and then, the previously discussed steps are carried out manually. As the process needs to be automated, instead of displaying the form directly, it should be loaded from the controller, which already has an instance of a bean. On form submission, the values entered by the user will be bound to this instance. This instance can now be used in the controller to carry out business logic. Spring 2.0 onward provides a set of tags, which are aware of data binding in form handling in the view, to make development easy.

Let's add a form to the ReadMyBooks application to understand form submission using Spring-provided form tags. We will do this in two steps: one, displaying the form, and second, post processing the submitted form.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.146.255.127