Hi..
Step 6-In the left hand side click on tree of the project and src will be extract...
In src >com.client> there are 4 files
  1. loginpage
  2. Newuser
  3. GreetingService.java
  4. GreetingServiceAsync.java
GreetingService.java

package com.client;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("greet")
public interface GreetingService extends RemoteService {
  String check(String name,String password);
  String newuser(String name,String password);
}

Code for GreetingServiceAsync.java


 
interface GreetingServiceAsync {void check(String name,String password, AsyncCallback<String> callback);void newuser(String name,String password,AsyncCallback<String> callback);
com.client;
package
import
/**
* The async counterpart of
*/
<code>GreetingService</code>.
public
void check(String name,String password, AsyncCallback<String> callback);
void newuser(String name,String password,AsyncCallback<String> callback);
}
interface GreetingServiceAsync {
com.google.gwt.user.client.rpc.AsyncCallback;
Step 7-

Open src >  Com.Server  >


Greeting ServiceImpl.java

package com.server;

import java.net.ConnectException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import com.client.GreetingService;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
/**
 * The server side implementation of the RPC service.
 */
@SuppressWarnings("serial")
public class GreetingServiceImpl extends RemoteServiceServlet implements
    GreetingService {


 Connection con=null;
 Statement st=null;


 ResultSet rs=null;


 String url="jdbc:mysql://localhost:3306/mydb";


 public void call()
 {
  try
  {
   Class.forName("com.mysql.jdbc.Driver");
  }
  catch(ClassNotFoundException e)
  {
   System.out.print(e.getMessage());
  }
  try
  {
   con=DriverManager.getConnection(url, "root", "");
   st=con.createStatement();
  }
  catch(SQLException e)
  {
   System.out.println(e.getMessage());
  }
 }
@Override
public String check(String s1, String s2) {
 // TODO Auto-generated method stub
 String ss="no";
 call();


 try
 {

   rs = st.executeQuery("select * from login where name='" + s1 + "' and password='" + s2+"'" );
  
   if(rs.next())
   {
    ss="yes";
    System.out.println(rs.getString(0));
    System.out.println(rs.getString(1));
   }


 }
 catch(SQLException e)
 {
  System.out.println(e.getMessage());

 }


 return ss;
}
@Override
public String newuser(String name, String password) {
 String ss = "no";
 call();


 try
 {
  boolean ss1;
   ss1 = st.execute("insert into login values('" + name+"','"+ password +"')");
  
   if(ss1)
   {
   
   
    ss="yes";
   }



 }
 catch(SQLException e)
 {
  System.out.println(e.getMessage());

 }
 return ss;


}
}
Step 8-

  1. Install MYSQL and start its all services
  2. mysql cmd>create database mydb;
  3. cmd > cretae table login(name varchar(20),password varchar(20));
  4. insert into login values('vishal','myprogram');
  5. insert into login values('sonal','helloworld');
Hence now the program is complete and u can us it for database connectivity.
Thank you,
SONAL GARG
VISHAL DIXIT