Hi Jos�, Simply use HttpState#addCookie method to add a cookie to the HTTP session. Currently HttpClient overwrites manually set 'Cookie' headers. You are not the first one to have fallen into this trap. Quite a few people complained about what they see as disappearance of manually set 'Cookie' headers. I am planning to provide a patch against CVS HEAD soon. The fix, however, is not likely to make it into our stable 2.0 branch, so I strongly encourage to use HttpState class to handle cookies.
Cheers Oleg >-- Original Message -- >Reply-To: "Jakarta Commons Users List" <[EMAIL PROTECTED]> >Reply-To: <[EMAIL PROTECTED]> >From: Jos� Gustavo Zagato <[EMAIL PROTECTED]> >To: "'Jakarta Commons Users List'" <[EMAIL PROTECTED]> >Subject: HttpClient Header Problem >Date: Thu, 23 Oct 2003 08:44:37 -0300 > > >Hi Folks ! > > I'm trying to develop an applet with uses the commons httpclient >to interact with a struts action. I developed a few examples and it >worked fine, but now I need to somehow make the applet "join" the http >session started by the browser with loaded the applet. I tried to add a >Cookie to the request with contains the session id. In another shot I >tried to add a new header entry with contains the session id. >Unfortunately all shots went to wrong directions. > > So does anyone here has a example on how to add a new header entry >to a http get request ? There is any thing special that I need to do to >"join" a already started session ? How deep is the rabbit hole ? > >Cheers ! > > Jos� Gustavo Zagato Rosa >System Analyst - Atos Origin >[EMAIL PROTECTED] > > > > Jos� Gustavo Zagato Rosa >System Analyst - Atos Origin >[EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
