• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

how to connect two servers using java.

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
In the renaissance, how big were the dinosaurs? Did you have tiny ads?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic