aspose file tools
The moose likes Tomcat and the fly likes What are good ways to send request from one server to another server? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "What are good ways to send request from one server to another server?" Watch "What are good ways to send request from one server to another server?" New topic
Author

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

Satyajit Bhadange
Ranch Hand

Joined: May 13, 2010
Posts: 104
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 ?


Thanks
user101
Problems And Solutions - Algorithms
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 19357
    
  10

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

Joined: Mar 22, 2005
Posts: 42954
    
  73
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.
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: What are good ways to send request from one server to another server?