Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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 Murach's Java Servlets and JSP this week in the Servlets 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: 1075
    
    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: 1075
    
    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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: For struts form validation
 
Similar Threads
ActionForm generator
How to restrict URL in structs validations?
struts validator
Struts 1.2 - Client and Server-side validations
Use of Javascript with struts custom tag <html:button> and <html:submit>