Results 1 to 4 of 4

Thread: How to validate form field before execution of a servlet service method

  1. #1
    Join Date
    May 2008
    Posts
    255

    How to validate form field before execution of a servlet service method

    How to validate form field before execution of a servlet service method, the form field validation should be like that if anybody enter the extended keyword then it just simply discard it and should throws an exception, does anyone has simple function to enable this please let me know.

  2. #2
    Join Date
    Feb 2008
    Posts
    129

    Re: How to validate form field before execution of a servlet service method

    Write a javascript method to validate input fields and call this method based on event of your requirement. You can find numerous methods, tips and tricks and utilities (components and applets) on the Internet for carrying out form validations. You search for one and you will end up with many.

  3. #3
    Join Date
    Jan 2006
    Posts
    181

    Re: How to validate form field before execution of a servlet service method

    JavaScript or VB Script can be used to validate at the client side. But VB script supports only IE browsers. If it client side validation do with the javascript if it is serverside validation we can use Filters and do the validations there example login authenticated or not. Validation for the controls is an important factor in web programming. Usually client side scripts are used for the validation at the client's browser. JavaScript is a widely accepted scripting language, which is compatible with all browsers.

  4. #4
    Join Date
    Jan 2009
    Posts
    108

    Re: How to validate form field before execution of a servlet service method

    Validations can be performed to detect several different several aspects. Validations can be performed to check for blank fields, it can detect for whether the filled value is a valid data. Simply cut and paste the below code into the <body> section of your page. It contains a form with one box that is checked for "email validity".Say there may be some restrictions on the username and password. Some sites may only allow alphanumeric characters, and only underscore for username, password can contain letters and digits only. So all these checking can be performed with JavaScript.

Similar Threads

  1. Date field in HTML form
    By Messenger in forum Software Development
    Replies: 6
    Last Post: 29-07-2010, 10:30 AM
  2. Method execution problem in java
    By Elizabeth Allen in forum Software Development
    Replies: 5
    Last Post: 12-03-2010, 12:51 PM
  3. Switch the 'action' field in an HTML form
    By MarceloQuad in forum Software Development
    Replies: 4
    Last Post: 07-02-2010, 06:05 AM
  4. Disable yellow autocomplete form field
    By teenQ in forum Technology & Internet
    Replies: 3
    Last Post: 06-08-2009, 09:57 PM
  5. To access a text field from another form
    By Sanket07 in forum Software Development
    Replies: 6
    Last Post: 06-02-2009, 06:42 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,565,481.87974 seconds with 17 queries