Greetings: Is their a possibility to retrieve the headers from HttpResponse, i know we can retrieve it from the HttpRequest but i need it from the HttpResponse. Here's why i need to retrieve the response header: I have a servlet A running on my local machine that needs to send an object to servlet B that is running on a remote machine as a post message. for servlet B to accept the post message i need to send the cookie(generated by serlvet B) in the post message. Any help is greatly appreciated. -Sudhakar
no i can't forward the request to servlet B since servlet B is on a remote machine and even if it were i don't want to because i need the response from servlet B to be processed by servlet A. I am using oreilly's HttpMessage.sendPostMessage(obj) method to perform a post on the remote machine, this returns me an inputstream that contains the response, i am trying to figure out if this response will contain the header info, if so then i can parse the response to retrieve the info needed. Is their a better way to do this?? Any suggestions??
Yep! I missed the fact that servlet B resides on a remote machine. [ January 09, 2004: Message edited by: Bosun Bello ]
Joined: Jun 02, 2003
Thanks for the response Frank, but i don't have the liberty to use this software, i am bound to use custom made classes or oreilly only. Any suggestions?? Thanks, -Sudhakar
Joined: Jan 07, 1999
In which case I suggest you download the source code for HTTPUnit, and use any bits you like in your "custom code". That's the beauty of open source. Although limiting oneself to just one, limited, open source package, rather than using whatever is most suitable does seem a bit pointless.