Hello Joan,

there is no need to shout.

The question is: doing this, am I setting this cookie for all threads or
just for the current thread that is executing this code?

For all threads.

Obviously, I want
to set this cookie just for the current thread, not for all. Is this
correct? And if not, how should I do it?

You should have a separate HttpState object for each thread
instead of using the default HttpState object for all of them:
http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/HttpClient.html#executeMethod(org.apache.commons.httpclient.HostConfiguration,%20org.apache.commons.httpclient.HttpMethod,%20org.apache.commons.httpclient.HttpState)

And the following question is: this request is sent to another servlet, that
reads it. But if I examine the HttpServletRequest, I always get null for
cookies attribute. It’s like httpclient is not including the cookie in the
request I’m sending to the remote servlet.

Check the domain and path attributes of your cookie.
Enable wire logging to see wether the cookie is sent or not.
http://hc.apache.org/httpclient-3.x/logging.html

hope that helps,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to