Converters and Formatters
In Chapter 19, “Data Binding and the Form Tag Library” you witnessed the power of data binding and learned to harness it using the tags in the form tag library. However, Spring data binding is not without limit. There are cases where Spring is clueless on how to bind data correctly. For example, Spring will always try to bind a date input to a java.util.Date using the default locale. If you want Spring to use a different date pattern, for example, you need to use a converter or a formatter to help Spring.
This chapter discusses the converter and the formatter. Both are used to convert one type of object to another. Converters are generic components that can be used in any tier of the application. Formatters, ...