• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

New to Struts and have basic question

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody,
I am new to struts frame work.
My question is how to validate the jsp form in struts.Do we need to use client side java script or some other method.
Some one told that in FormBean we can do the validations.Please explain it.I don't know how to handle it.
thanks
gtr
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Form bean can do your basic validation. You can also use JavaScript but you should always think of JavaScript as a bonus. Never rely on the JavaScript having sent valid data since the user can copy the page and edit out the JavaScript if he really wants to. JavaScript should be a convenience to the user not the programmer.
If you don't want to write a Form bean for every JSP, then you can use the DyanActionForm to do basic validation.
Remember, the form should be doing only basic validation. There should be no database reads or complex business logic.
reply
    Bookmark Topic Watch Topic
  • New Topic