nValidator
nAn
optional class that can be invoked for validating form data for a given command (form) controller. This validator class is a
concrete
class that implements org.springframework.validation.Validator interface.
nOne
of the two methods required by this interface is the validate method, which is passed a command object, as mentioned previously, and an Errors object, which is used to return errors.
nAnother notable validation class is org.springframework.validation.
ValidationUtils, which provides methods for rejecting empty fields.
nSpring Tag Library (spring-form.tld in spring.jar)
nThe
spring bind tag library is simple
yet powerful. It is typically used in JSP files via the <spring:bind> tag, which
essentially binds HTML
form
fields to the command object.