In this example we have developed a jsp page "Checkmail.jsp" in which onSubmit="return ValidateEmail ()" of form performs the validation.
First we will check that the input field is not empty.
Then we will do the email validation using the function emailcheck (). The function emailcheck () is used to verify that the input given value is a possible valid email address. This function makes sure the email address has one "@", at least one ".". It also makes sure that there are no spaces, extra '@'s or any "." just before or after the @. It also makes sure that there is at least one "." after the @.In emailcheck () it is also checked that "@" must not to be at first place before any string and "." must not be at the first place.
Validation of E-mail Address Using Java: Email Validation
<%@ page language="java" %>
Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used twice in /home/content/22/4814422/html/Validation_of_E-mail_Address/index.php on line 76