• Post Reply Bookmark Topic Watch Topic
  • New Topic

pass data from one web server to another web server?

 
kri shan
Ranch Hand
Posts: 1481
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to pass data from one web server to another web server. How can i do that? Is it possible thru RequestDispatcher's forward() ??? If yes, how will i pass my data?
[ April 16, 2005: Message edited by: Bear Bibeault ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, requestDispatcher only works for resources contained in the current context.
Look into RMI, JMS, or WebServices.

If the amount of data is small, you could add queryString parameters to a respose.sendRedirect call. You could also write a form who's action attribute points to the other server. This could either be submitted by the user or by a Javascript function. With these approaces, however, you are likely to run into problems with SSL, firewalls, and and browser security settings. All three will see these tactics as attmepts to spoof the user into going somewhere unintended.
 
kri shan
Ranch Hand
Posts: 1481
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ben Souther,
My amount data is huge. If i use queryString parameters to a respose.sendRedirect here, it comes to the Browser. Everything should happens on the server side.
How RMI / JMS supports transfer of bulk data from one server to another server ???
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a Distributed Java forum on this site. You might want to ask there.
I don't work with either enough to do the topic justice.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thusly moved.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how RMI / JMS supports transfer of bulk data from one server to another server ???

Java has lots of options for moving bulk data between servers.
The obvious first requirement is that your data object must be serializable either with Object serialization or to some format like XML.
The obvious second requirement is that both servers have to have something in common. With JMS that would be a JMS server, but it could be something as simple as a shared network file directory for serialized data objects.
Thirdly, there must be a unique identifier that server A can communicate to server B in the redirected request.
Bill
 
kri shan
Ranch Hand
Posts: 1481
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi William Brogden,
passing bulk data bettween one server to other possible thru javascript is possilbe ?
If javascript supports, then i don't need jms severs / rmi's on both sides...
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaScript can indeed open a URL and pass a bunch of data from a HTML page. But NOTE - that is still from the HTML page on a client browser somewhere. I thought you wanted server to server transfer of bulk data.
I can't imagine why you would want to use server-side Javascript if you are already writing Java. It is easy to open a java.net.HttpURLConnection to any URL and send data via POST or PUT, but note that covering all the error conditions etc. may make you wish you had gone with JMS.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!