Connect to server

How to connect to server.......

Client class

import java.io.*;
import java.rmi.*;



/**
* Title: Garments
* Description:
* Copyright: Copyright (c) 2008
* Company: Null
* @author Iqbal
* @version 1.0
*/

public class Client
{
String sname="";


public Client()
{
try
{
File ReadFile=new File("I:/BCISPP/Server.txt");//File is a class
FileReader in=new FileReader(ReadFile);//FileReader is a class

int c;
while((c=in.read())!=-1)
{
sname=sname+(char)c;//data-casting
}
in.close();
}
catch(IOException ioe)
{
System.out.println(ioe);
}

}
public ProductController ConnectWithServer()
{
ProductController con=null;
try
{
con=(ProductController)Naming.lookup("rmi://"+sname+"/ProductController");//naming is class
}
catch(Exception ex)
{
System.out.println("Client error:"+ex);
}
return con;
}
}

Connect to client

Service class

import java.rmi.*;
import java.net.*;


/**
* Title: Garments
* Description:
* Copyright: Copyright (c) 2008
* Company: Null
* @author Iqbal
* @version 1.0
*/

public class Server
{
public static void main(String args[])
{
try
{
ProductImpl prod=new ProductImpl();
String sname=InetAddress.getLocalHost().getHostName();
Naming.rebind("rmi://"+sname+"/ProductController",prod);
System.out.println(sname+" Server is Ready.");
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
}

TOTAL :
SHIPPING FEE :
GRAND TOTAL :

Thank . We received your oder.

Payment Method
Order ID
Date order
Total

Please make your payment directly via UPI transfer by scaning our below QR codes. Use your Order ID as the payment reference. Your order won't be shipped until the funds have cleared in our account.

Please make your payment directly into our bank account. Use your Order ID as the payment reference. Your order won't be shipped until the funds have cleared in our account.

Order detail:

Product Name:
Quantity:
Size:
Price:

Customer's detail:

Full name:
Email:
Phone number:
Postcode:
Address:
City:
State:
Country:

Contact Form

Name

Email *

Message *