Forums Register Login

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

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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.
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 743 times.
Similar Threads
Problem with getRequestDispatcher()'s forward. Any alternatives?
RequestDispatcher
Can I forward a local variable to another servlet?
RequestDispatcher
difference b/w forward & sendRedirect
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:51:29.