aspose file tools*
The moose likes Struts and the fly likes Validation Framework in struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Validation Framework in struts2" Watch "Validation Framework in struts2" New topic
Author

Validation Framework in struts2

satnam singh negi
Greenhorn

Joined: Aug 13, 2011
Posts: 25

hi i am working with struts 2 with hibernate .

i want to use validation framework with my application ,and i made ApplicationResources.properties file under src/resources/ .

and the myAction-validation.xml in the package where my action class is located.

but m not able to work with it,i started using a simple text field in my jsp


i have used valdiation framework with struts1.x it was cool there but this is first time m working with struts2. Please suggest


Anshul K Jain
Greenhorn

Joined: Jul 24, 2010
Posts: 20

HI satnam,
Try using the validate='true' inside your form tag.


Anshul
satnam singh negi
Greenhorn

Joined: Aug 13, 2011
Posts: 25

Anshul K Jain wrote:HI satnam,
Try using the validate='true' inside your form tag.


Anshul


i guess this is for client side validation, but in case i want to do some server side validation then i want to use validation framework..and i am able to use it....just need to configure some validation rules with respect to each action ...it pretty simple and good to work with struts validation framework..


thanks for the responses.

cheers
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Validation Framework in struts2