hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Naresh Agarwal <naresh_i...@yahoo.com>
Subject Re: R: session maintenance with two different HttpClient objects
Date Wed, 25 May 2005 12:07:24 GMT
This works. But I don't have access to obj1 when I'm calling "getDetails" using obj2.
I'm calling "login" and "getDetails" in two different entities using obj1 and obj2 respectively,
which *cannot* share anything in memory. However I can extract cookie from response of "login",
store the cookie in some file and read this cookie from the file to set it in obj2 before
calling "getDetails. 
But this is not working from me.

Andrea Sodomaco <andrea@sodomaco.it> wrote:

can it help you?

Andrea Sodomaco

-----Messaggio originale-----
Da: Naresh Agarwal [mailto:naresh_iitd@yahoo.com] 
Inviato: luned́ 23 maggio 2005 15.32
A: httpclient-user@jakarta.apache.org
Oggetto: session maintenance with two different HttpClient objects


I'm using HttpClient library for writing a specialized http client.

Let's say I have two instances of HttpClient object obj1 and obj2, which
communicate with same application running in web server. This
application provide two operations - "login" and "getDetails", which
need session maintenance using cookies. 

I am using obj1 and obj2 as follows - 

1. Call "login" operation using obj1 and extract the cookie from the
2. Call "getDetails" operation using obj2 after setting cookie
extracted in step 1.

But my "getDetails" fails saying that login is required. However, if I
use obj1 in step 2, it works fine.

Basically, I've a special requirement to use *two different* instances
of HttpClient to communicate with same web service (which needs session

Am I missing something? Does session maintenace works only if all the
operations are called using same HttpClient object?

Any help will be greatly appreciated.

thanks & regards,
Naresh Agarwal

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 

To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org

Do You Yahoo!?
 Yahoo! Small Business - Try our new Resources site!
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message