I wanted to login to a website thru my application, For that i used
DefaultHttpClient client = new DefaultHttpClient();
HttpPost postmethod = new HttpPost("the url to submit the login data and related parametrs");
//set header for the postmethod and executed the client,
but I am getting the response as "COOKIE NOT ENABLED IN YOUR BROWSER".
( which is the same I can see as when i disabled my browser cookie and entering the login url ).
I could get all the cookies in
List<Cookie> cookies = client.getCookieStore().getCookies();
But how can I post the cookie to the login url?
can I post the COOKIE obj as header , How is it done. Please Help me with some sample code.