File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Servlet to servlet communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet to servlet communication" Watch "Servlet to servlet communication" New topic

Servlet to servlet communication

Dustin Whitte

Joined: Feb 02, 2004
Posts: 19
What is the best mode of communicating between two servlets on different web servers/physical boxes?
I need to pass parameters to a different application's servlet and receive data back.
thanks for any help,
danny liu
Ranch Hand

Joined: Jan 22, 2004
Posts: 185
In my point of view, servlet is not for business processing purpose.
The better choice is wrappering the functionalities into a web service and then access it from servlet.

Jeffrey Spaulding
Ranch Hand

Joined: Jan 15, 2004
Posts: 149
As always, it depends.
We use XML-RPC (see
Seems to work nicely without too much overhead.
It depends on the complexity of the objects you want
to put on the wire.
Dustin Whitte

Joined: Feb 02, 2004
Posts: 19
Thanks for your response I was not aware of the XML-RPC project. It might be a good fit for our project.
Gowrishankar Mudaliar
Ranch Hand

Joined: Oct 20, 2001
Posts: 39
Have you tried a url connection with the required parameters?
That should work for some scenarios....
I agree. Here's the link:
subject: Servlet to servlet communication
jQuery in Action, 3rd edition