Hi,
I am using HttpClient PostMethod to post login name value pair credentials
.This aspect is working fine.
On succesfull login its redirected to a page(jsp) which lists al particular
items available.
I need to read the response of this redirected page to get hold of an
id.Though i tried using setFollowRedirect true approach i am not able to a
handle to the correct response.
First Step:Logon
----------
PostMethod post= new PostMethod("/servlets/Logon");
userid = new NameValuePair("userName", userid);
password = new NameValuePair("userPassword",pwd);
post.setRequestBody(new NameValuePair[] { userid, password
});client.executeMethod(authpost);
Its OK
Second Step:Redirected Page response
-------------
Header header = post.getResponseHeader("location");
String uri = header.getValue();
GetMethod redirect = new GetMethod(uri);
client.executeMethod(redirect);
System.out.println(redirect.getResponseBodyAsString());
Problem is with this .
Regards
Raj
--
View this message in context:
http://www.nabble.com/Getting-response-from-redirected-page....-tp18028897p18028897.html
Sent from the HttpClient-User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]