• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

How to use struts validation

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am new to struts please help me.

My project flow like this :

The request goes to CustomerAction.do class then it forward to Customer.jsp .

i get the information from the user using Customer.jsp i want to validate the users data is it possible?

how can i use struts validation for this ?
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sivakumar,

I would firstly, suggest you reading some online struts tutorial.

But, just to provide to with some insight; struts has a validation framework which gives to options of having two types of Validation:-
1. Client Side validation
this can be done by using Validation Framework configuration using validation XML configuration file. This help in generating Client Side Java Script validation Code. This is good in most of common scenarios. But if you have a complex validation then i would suggest using the second option.

2. Server Side Validation
this can be by extending ValidatorForm instead of Simple Action Form. you have implement Validate method in your form class also you have validation done in your action class.

regards
 
sivakumar panchu
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Sharma
 
You can't have everything. Where would you put it?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic