Go Back   TechArena Community > Hardware > Portable Devices
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , ,

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

Portable Devices


Reply
 
Thread Tools Search this Thread
  #1  
Old 11-09-2009
Quattro's Avatar
Member
 
Join Date: May 2008
Posts: 84
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.
Reply With Quote
  #2  
Old 11-09-2009
Member
 
Join Date: Feb 2008
Posts: 69
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.
Reply With Quote
  #3  
Old 11-09-2009
Donald's Avatar
Member
 
Join Date: Jan 2006
Posts: 73
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.
Reply With Quote
  #4  
Old 11-09-2009
Bantu's Avatar
Member
 
Join Date: Jan 2009
Posts: 57
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.
Reply With Quote
Reply

  TechArena Community > Hardware > Portable Devices


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "How to validate form field before execution of a servlet service method"
Thread Thread Starter Forum Replies Last Post
Method execution problem in java Elizabeth Allen Software Development 5 1 Week Ago 11:51 AM
Switch the 'action' field in an HTML form MarceloQuad Software Development 4 07-02-2010 05:05 AM
How to use Get Method in ASP Form? SKREECH Software Development 4 28-01-2010 09:10 PM
Disable yellow autocomplete form field teenQ Technology & Internet 3 06-08-2009 09:57 PM
To access a text field from another form Sanket07 Software Development 6 06-02-2009 05:42 PM


All times are GMT +5.5. The time now is 01:59 AM.