pradeep
pradeep

Reputation: 1

Struts 1.2 validation question

I am validating my login form. I have created a validation.xml, added the plugin in struts-config.xml, created ApplicationResource.properties file etc. I have done all the necessary things for validation frame work, my application is also running without errors but it is not validating the data. I have rechecked many times. Please anyone tell me where should I check for probable errors.

Thanks

Upvotes: 0

Views: 597

Answers (1)

user159088
user159088

Reputation:

If as you say, the application is running without errors and your data is not validated, then I think that the validator plugin isn't picked up by your application. That could occur if your login form is not extending ValidatorForm but your plain ActionForm. Are you extending ValidatorForm?

Recheck your code against a Struts validator guide. Even if you already did that, there is still something you might have missed or misunderstood.

Have a colleague or friend look at it. Someone with a fresh clean perspective might notice something you missed because you stared to long at your own code.

If that is not possible you can always delete everything (that is to be read as: save current solution somewhere then get a clean copy from source control) and start from scratch. If then it works, you can compare with what you saved from your initial solution and spot the difference.

Upvotes: 2

Related Questions