May 2015
Intermediate to advanced
234 pages
4h 18m
English
In this recipe, you will learn how to display a text field, textarea field, password field, and hidden field using Spring form tags. When the form is submitted, we will retrieve the field value in a controller method.
Here are the steps to display and process text fields:
String attribute of the default object (refer to the Setting a form's default values using a model object recipe):user.setFirstName("Joe");<form:input path="firstName" /> <form:textarea path="firstName" /> <form:password path="firstName" /> <form:hidden path="firstName" />
Read now
Unlock full access