File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

how i vaidate form field in struts with validation .xml

 
Ashutosh kumar singh
Greenhorn
Posts: 26
  • 0
  • 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: 1375
Eclipse IDE Java
  • 0
  • 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
  • 0
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic