Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to capture a response from a server after forward(req,res)

 
Jason Rodrigues
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was wondering how to go about this problem .

I have a servlet that generates an xml documnet and sends the contents
to server A this has to be done in the background and transparent to the user. Server A verfies the data and send back the xml doc with extra information . I need to strip this and display it to the user

The problem i face is how to i capture the response from server A
as well.

RequestDispatcher dis = req.getRequestDispatcher("../server_A_URL");
dis.forward(req, res);

How to i capture the response back from server A after the forward ?

Any suggestion would gre
 
Sameer Damle
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
reeve
i am assuming that your servlet is running on server other than serverA.
you can call another jsp page(which wiil be on the same machine as that the servlet) from the serverA after proccessing is complete which will handle the response. you must be knowing what is coming from serverA as a response. you can pass the processed response as a parameter to the jsp page.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic