Jsp code for validating username and password


10-Jan-2018 13:50

The form below has three input fields: username, pwd1 and pwd2. If a false value is returned then the form submission is cancelled.This code will work for browsers as far back as Netscape 4 (circa 1997). If you're not sure how to place this on your page, you might need to read the preceding article on Form Validation, or view the HTML source of this page.For security a password should never be displayed in HTML or sent by email.If you're concerned about security you should have some policy on what constitutes a valid password.Instead of as this lets the browser (and the user) know that the contents of that field need to be secured.The password won't appear on the screen as you type and most browsers also won't 'remember' the values entered in fields as they do with other form elements.

After all it's only the browser display being obfuscated and not the data transfer.A lot of websites now require registration, meaning that users need to be assigned a username and password.Here are some simple steps to make the process more secure.Here, we are giving our Java Script codes for validating Login form.