File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What are good ways to send request from one server to another server?

 
Satyajit Bhadange
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one Tomcat Server A and Tomcat Server B running.
Both A and B can be accessed through Browser.
But A needs few services from B. What is a good way to send request to server B from server A ?
Can I use Remote method Invocation through Servlets ?
If yes then how to implement the same ?
I have implemented RMI through java but not through servlets ?
 
Paul Clapham
Sheriff
Pie
Posts: 20167
24
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That depends on what those services are and how they are implemented. For example there is no point in expecting to access a service via RMI unless it is written to accept RMI requests. So if your Server B accepts requests from a browser, then that means it is accepting requests via HTTP and returning the responses the same way. That isn't RMI.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For something running in a servlet container it would be natural to use HTTP - how about a RESTful web service? The JAX-RS API works well for that, and its reference implementation (called Jersey) works nicely in web apps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic