aspose file tools
The moose likes Struts and the fly likes For struts form validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "For struts form validation" Watch "For struts form validation" New topic

For struts form validation

Ashutosh kumar singh

Joined: Feb 27, 2008
Posts: 26
any body can confirm that DynaActionForm in struts is necessary for form validation. can i do form validation through normal action form. because there is no actual coding in .net....
it's very urgent.........

Ashutosh kumar Singh
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1294


Yes ...we can do Form Checking/Validation using simple Action Form's validate() method.

~ Abhay

Oracle certified Java 8 Programmer I (1Z0-808), 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
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1294

Using DynaActionForm is just another way of doing Form Validation.
We can do it using simple Action Form's validate() method.

~ Abhay
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Actually, the DynaActionForm class has nothing at all to do with validation. It's just a way of dynamically declaring fields in an ActionForm without having to write a class.

What you're probably referring to is the Struts Validadion Frameork. That is accessed by having your ActionForm extend Validator form (or if you've been using DynaActionForm, use DynaValidatorForm instead) and then declaring the validations in a validator.xml file.

Consultant, Sima Solutions
I agree. Here's the link:
subject: For struts form validation