wood burning stoves 2.0*
The moose likes Struts and the fly likes Regarding validations part of Struts... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Regarding validations part of Struts..." Watch "Regarding validations part of Struts..." New topic
Author

Regarding validations part of Struts...

Tusshar Fasate
Ranch Hand

Joined: May 21, 2008
Posts: 81
Hi,
Struts 1.x framework provides its validation framework.For that we need to add validation.xml and validator-rules.xml files into
our application.But procedure which is used in this ,I think is difficult to understand.Even complex validations like field should have only alphabates no spaces allowed or something like for file its should allow only .pjeg format.....are not possible or very difficult to write using Struts validation..
I am using Struts framework for my project but I have used simple javascript validations for my application like we do use in JSP,Servlet application.Is it fine to go with this?
Please comment on this..
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Sure, using JavaScript validation is fine. Although using regex validations via a validation.xml file really isn't all that difficult.

That said, it's still important to validate input data on the server side.
 
 
subject: Regarding validations part of Struts...