This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "For struts form validation" Watch "For struts form validation" New topic
Author

For struts form validation

Ashutosh kumar singh
Greenhorn

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


thanks
Ashutosh kumar Singh
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1076
    
    1

hi

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

~ Abhay


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
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1076
    
    1

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.


Merrill
Consultant, Sima Solutions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: For struts form validation
 
Similar Threads
Use of Javascript with struts custom tag <html:button> and <html:submit>
struts validator
Struts 1.2 - Client and Server-side validations
ActionForm generator
How to restrict URL in structs validations?