• Post Reply Bookmark Topic Watch Topic
  • New Topic

Inter servlet communication [ two different containers]

 
Ketan Khairnar
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am calling a servlet deployed on machine 2 (M2) from servlet on machine 1(M1). Servlet M2 accepts xml as querystring and writes the response using printWriter.


Can i still read the same response in my servlet on M1? I am calling servlet on M2 susing URLconnection but I receive xml which i posted as querystring in inputstream.


I have tried the same with local servlet but that is giving me 505 error.
My scenario is similar to this thread --> http://forum.java.sun.com/thread.jspa?threadID=672133&messageID=3927859

Pleae help me asap
Thanks,
Ketan
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on what you mean by "calling".
Servlets are not called, methods are called.

Are you making a request from M1 to M2 directly with URLConnection or HttpClient, or are you using sendRedirect to cause the client to make a new request to M2?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!