I am trying to develop an app using struts which has form with fields. I am validating the fields using the validation xml, but its not showing any error while some of the fields are empty.. Could anyone help me to find a loophole in my app, I am new to Struts, any help is greatly appreciated...
Following are the codes in my app,
My initial page with form,
My validation xml named LoginAction-Validation.xml,
I have done the changes you mentioned, its still not checking the validation xml to get the errors while the fields in the form is empty.
Ravindra B Pawar
posted 9 years ago
The problem with your code was you were displaying the login jsp page (for first time visit to page) for that you created one dummy action login
Then you were submitting the for to same login action which was simply displaying the form again
if you submit form to the new action which will process your form and corresponding xml should be referred for the validations