• 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

efficiency of struts validation

 
Ranch Hand
Posts: 188
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
The struts validation causes a server hit even for validation that can be done on the client end , is'nt this going to prove too costly for most applications ?

Even the so called client side validation reaches upto the controller which is essentially a server side component , so according to me it is also not of much help !

Please can some one throw some light on this aspect

Thanks in advance
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sid,
Struts provides an option to do both client (JavaScript) and server (Java.) It generates JavaScript to validate all the form fields in the browser when the user clicks submit. If you have this option set, the server validation would just run if the user turns off JavaScript.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One further point: Struts 1 client-side validation does not make any calls to the server while validating. It is all set up before the page is rendered in JavaScript functions. When the user actually clicks the submit button, the client-side validations are all handled via local JavaScript calls that do not access the server.
reply
    Bookmark Topic Watch Topic
  • New Topic