Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forwarding Posting Data to extrenal server 1

Status
Not open for further replies.

DJSmith

Programmer
Aug 14, 2000
82
GB
Hi,

I am having huge problems trying to forward data received on a servlet to completely separate URL. I have been playing with the RequestDispatcher object but I don't think this is the correct thing to use.

The reason I cannot simply submit to this URL (a third party transaction processing site) is because I do not want to redirect but receive the results so I can complete my processing.

I hope this is not too confusing

Thanks

DJS
 
>> I hope this is not too confusing

It might be. Forwarding only works on the same web server.

>> I do not want to redirect but receive the results so I
>> can complete my processing.

So you want your server code to receive the response from this other site? Forwarding won't do that anyway. You want to look at using the HttpURLConnection and associated classes to make the request yourself.

-pete
 
Okay, thanks for that I know have my HttpURLConnection working but I am unsure of how to add my data to my request (that is the data which was submitted to my servlet).
 
It's okay, I've worked it out. All I had to do was to write it to the Output Stream.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top