Dear all,
I have to design a
Struts application. In this I have to do 2 types of validations(for a login form):
1) To check whether a field is empty or not.
2) To check whether the user and password match or not.
Now, as far as I understand Struts, for the first type of validation I should use "validate" method of the ActionForm, and, for the second type of the validation, I should use the "execute" method and redirect the user to a different
JSP page if the login is invalid.
Now using "validate" method is a server-side validation and the validations inside a "execute" method is also a server-side validation. So if I validate the username and the password in the "validate" method, is it right? If not what difference will it make in case of implementation as well as design. Please clear the difference between validating in a ActionForm and in a Action class. I am very confused in it.
Thanks in Advance