JavaScript
  Home arrow JavaScript arrow Validators: Introducing Struts Validator F...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Validators: Introducing Struts Validator Framework
By: A.P.Rajshekhar
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 87
    2005-08-31

    Table of Contents:
  • Validators: Introducing Struts Validator Framework
  • Validator Framework-What is it?
  • Validator Framework- A Real world Example
  • Provide the appropriate ActionForm Class

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Validators: Introducing Struts Validator Framework


    (Page 1 of 4 )

    Validation is an important part of many web applications. Input can be validated on the client side or the server side. The Validator framework can be used to simplify input validations on both sides. This tutorial explains how.

    Client side validation is the holy grail of web development. Any web application that does not utilize forms to gather user information would be a rarity. For a developer, web forms are synonymous with input validation. The process of validating the input can be carried out at two places -- either at the client side or at the server-side.

    Server-side validation is not a popular choice in many situations due to the round trip factor. That means the data is validated at server-side and the result is sent to the client. So just to validate, an extra request-response cycle is required. Hence, client-side validation is preferred over server-side validation.

    The arrival of JavaScript gave the needed boost to client-side validation. But as the number of validations to be performed on the entry fields increased along with the number of fields to be validated, JavaScript based validations became complex. Script libraries were built to contain this complexity. But still something was amiss. The web development itself was undergoing a transformation. A declarative approach based on XML was replacing the programmatic approach, especially in enterprise application. And when the platform is J2EE, where the declarative approach is a norm, how can input validations be left behind to be done solely through JavaScript?

    It was in such a situation that the Validator framework came to the forefront. So, what is the Validator framework and how can it be used to simplify input validations -- both the client as well as the server-side? I will be discussing these aspects in this part of tutorial.

    More JavaScript Articles
    More By A.P.Rajshekhar


       · HiThank you for reading this article. Hope it has been helpful. One request....
       · Hi Rajshekhar,I have a doubt related to Struts validations.I want to know how to...
       · HiSorry for delay in replying. Net was down here. Coming to your question,...
       · Thank you Rajesekhar.Its really helped me a lot in understanding the validation...
       · Extremely sorry for the long delay. The answer to your query is as...
       · Hi Rajshekhar, I want your help in server side validation in...
       · HiSorry for not replying for so long. I looked into your code. Its perfectly fine....
       · As you mentioned that "If the field is an html:select then the indexedlistproperty...
       · hi rajaeshekar, i think the guy missed <html:erors/> in the html/jsp page. This tag...
       · hi Vijen,in the JSP/HMTL page i think you need to place the <html:errors/> tag....
     

    JAVASCRIPT ARTICLES

    - Comparing Fields and Customizing Error Messa...
    - Checking Numbers and File Extensions with jQ...
    - Validating Digits and Dates with jQuery`s Va...
    - Validating Ranges, Emails, and URLs with jQu...
    - More Uses for the jQuery Tooltip Plug-in`s b...
    - Building Image-Based Tooltips with the jQuer...
    - Using the jQuery Tooltip Plug-in`s bodyHandl...
    - Using Rangelength, Min and Max with the Vali...
    - Using Minlength and Maxlength with the Valid...
    - Modifying Tooltip Coordinates with the jQuer...
    - Applying a Fade Out Effect with the jQuery T...
    - Tracking Mouse Movements with the jQuery Too...
    - Checking Online Forms with the Validator jQu...
    - Nested JavaScript Functions as Objects
    - The jQuery Tooltip Plug-in







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek