Home » Java AJAX Email Finder Example with database

Java AJAX Email Finder Example with database

by Online Tutorials Library

Java AJAX Email Finder Example

We can create an AJAX example in Java which checks whether the given email id exists in the database or not.

Steps to create email finder example using AJAX in Java

You need to follow following steps:

  1. Create table in database
  2. load the org.json.jar file
  3. Create input form
  4. Create server side page to search employee using name

Create table in database

In this example, we are using oracle 10g database. Here, we have created a table “user100” which has following data.

Java AJAX Email Finder Example 1


Load the org.json.jar file

download this example, we have included the org.json.jar file inside the WEB-INF/lib directory.


Create input form

In this page, we have created a form that gets input from the user to find email. When you click on the check availability button, it tells whether email id is available or not.

index.html


Create server side page to process the request

In this jsp page, we are writing the database code to search email id.

emailfinder.jsp



Output

Java AJAX Email Finder Example 2 Java AJAX Email Finder Example 3

You may also like