Win a copy of Functional Reactive Programming this week in the Other Languages forum!
    Bookmark Topic Watch Topic
  • New Topic

how i vaidate form field in struts with validation .xml

 
Ashutosh kumar singh
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Report post to moderator
problem is that according to your link all thing is simple. i have followed each step but in jsp page no error mesg is showing. i am sure that validation.xml file content is not calling on that time. even i have already added to both file, validation.xml and validator-rules.xml in struts-config file.
if possible then reply.
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
If you are using Action Form Class for your Form Bean , make sure it extends "ValidatorForm" class , not "ActionForm" class.

If you are using DynaAction Form Class for your Form Bean , make sure it extends "DynaValidatorForm" class , not "DynaActionForm" class.

So, without extending your Form Bean with above mentioned classes , Validation framework will not work ....


Try it out and let me know the output.

~ Abhay Agarwal
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Report post to moderator
This post is obviously a follow-up post to your original post in this thread. Please do not start a separate thread for a follow-up post. Just open the original thread and click the add reply button.

I'm closing this thread, but please feel free to continue the conversation in the original post.
 
    Bookmark Topic Watch Topic
  • New Topic