Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how i vaidate form field in struts with validation .xml

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic