aspose file tools*
The moose likes Servlets and the fly likes how to capture a response from a server after  forward(req,res) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to capture a response from a server after  forward(req,res)" Watch "how to capture a response from a server after  forward(req,res)" New topic
Author

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

Jason Rodrigues
Greenhorn

Joined: Oct 20, 2005
Posts: 21
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

Joined: Jan 05, 2006
Posts: 14
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.


I think like I'm diagonally ||||<br />parked in a parallel universe.\\\\
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to capture a response from a server after forward(req,res)