• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic