hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "vijay kumar" <gm_vijayku...@hotmail.com>
Subject Any examples on webmail login
Date Mon, 24 Mar 2003 17:52:19 GMT
Hi

I am new here and new to httpclient 2.0. I am trying write a http client
which will login to a webmail using username and password.

After executing the postmethod executemethod I got a response page with
mail login page and a error message "please upgrade your browser to one of 
the following" IE or netscape.

Is there anything I left out. I am using httpclient 2.0 alpha 3

here is my code.

PostMethod post = new PostMethod(url);

post.setRequestBody(formInput); //forminput

post.setRequestContentLength(EntityEnclosingMethod.CONTENT_LENGTH_AUTO);
post.setRequestHeader("Content-type", "text/xml; ISO-8859-1");

HttpClient httpclient = new HttpClient();
HostConfiguration hostConfig = new HostConfiguration();
hostConfig.setHost(connection.getHost(),connection.getPort(),connection.getProtocol());

httpclient.executeMethod(hostConfig,post);

Thanks in advance
Vijay.



_________________________________________________________________
Call US for just Rs. 5. http://www.msn.co.in/webtelephony/ Get a phone card


Mime
View raw message