aspose file tools*
The moose likes Struts and the fly likes how i vaidate form field in struts with validation .xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply locked New topic
Author

how i vaidate form field in struts with validation .xml

Ashutosh kumar singh
Greenhorn

Joined: Feb 27, 2008
Posts: 26
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.


thanks
Ashutosh kumar Singh
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1212
    
    1

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


Oracle Java Web Service Developer (1z0-897), Oracle certified Java 7 Programmer, SCJA 1.0, SCJP 5.0, SCWCD 5.0, Oracle SQL Fundamentals I, CIW Certified Ecommerce specialist
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
 
 
subject: how i vaidate form field in struts with validation .xml