Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to connect two servers using java.

 
vikas malviya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...all

i have to create an application in which two servers are two be connected.consider an example of login page in which all the details of login page are store in server1 and i have to store the data in another server i.e server2.....the main thing is thet both servers are in different locations.
eg.

server1 is in india and server2 is in US.

1.code for the connection of server1 to server2.

2. how to send data from server1 to server2.

Regards,

Vikas Malviya
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have a lot of options with Java.

One of the simplest would be to HttpURLConnection - assuming both can handle HTTP connections.
Another alternative would be email.

Packaging the data for transmission could be as simple as emulating an Http form request with named parameters or as complex as an encrypted SOAP message.

What are your requirements for secrecy, security and authentication of the data? How large is the data likely to be.

Bill
 
Sachin Kumar
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
your scenario is simple. It happens when keep static contrents on web servers and secured or business components on app servers where data is processed by app server. In your case you can achieve it through virtual directry mapping or including rthe login page data from server 1. Client application or user should always talk to server2 and you post data should go to server2.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic