File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Vallidation Using Annotation + Struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Vallidation Using Annotation + Struts 2" Watch "Vallidation Using Annotation + Struts 2" New topic
Author

Vallidation Using Annotation + Struts 2

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 757
Hi i am trying to validate field but fields are not getting validated.

bellow is my POJO class.



I have also enabled the client side validation as bellow





Jigar Naik


Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

if you are using hibernate, i think you can use hibernate validator..

Thank's


Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

ItDoesntWorkIsUseless

What happens? Are there any JavaScript errors? I don't recall if JavaScript validation requires the use of the <s:head> tag but it might--can't hurt to add it if it isn't there.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Wait, that's not the action? Did you set the visitor validation (or whatever it's called) on the action property that uses this class? Otherwise there's nothing to tie the validation to the action.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Vallidation Using Annotation + Struts 2