Hello Amit,

HttpClient client = new HttpClient();
client.getState().setCookiePolicy(CookiePolicy.COMPATIBILITY);
HttpMethod method = new GetMethod(url);
Int statusCode = client.executeMethod(method);

This will configure HttpClient to use the compatibility cookie mode. This is not necessarily required but is probably best to ensure correct cookie handling.


Please feel free to point me to a document/link which can give more
information about the same.

I am trying to connect to a website which needs cookie support
from the client. I am getting same response while trying to connect from
httpclient which I get when I access the site with cookies disabled in
my browser.

The cookie documentation on the HttpClient site is about all there is. There's not too much more to it.


What exactly is the problem you are having? Is HttpClient throwing exceptions when it tries to parse the cookies from this server?

Please take a look at the trouble shooting guide <http://jakarta.apache.org/commons/httpclient/troubleshooting.html> for some more things to look at. If this is not helpful in resolving the problem please post a wire log to the mailing list that shows the problematic transmission, see <http://jakarta.apache.org/commons/httpclient/logging.html> for how to create a wire log.

Mike


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



Reply via email to