You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Roland Weber <RO...@de.ibm.com> on 2005/07/07 11:37:43 UTC
Re: after executing a PostMethod I still see the login page
Hello Daniele.
> <form action="" method="POST" name="login">
> <font face=Tahoma style="font-size:10pt;"> <br>Enter your password
> here<br><br>
> <input type="password" name=p maxlength=12 size=37 style="border-width:
> 1px; border-color: black; border-style:none;" value="">
> <input type="hidden" name=w value="password">
> <br><br><input type=submit value="Login Now"></font>
> </form>
>
> and this is my java code:
>
> HttpClient client = new HttpClient();
> PostMethod method = new PostMethod(host);
> method.addParameter("p", "myrealpassword");
> int statusCode = client.executeMethod(method);
>
You have to add parameter "w" with value "password".
Hidden input fields are still input fields.
cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
Re: after executing a PostMethod I still see the login page
Posted by Roland Weber <RO...@de.ibm.com>.
Hi Daniele,
you have to scan the page returned by the server.
That's beyond the scope of HttpClient.
cheers,
Roland
Daniele Dellafiore <il...@fastwebnet.it>
07.07.2005 12:37
Please respond to
"HttpClient User Discussion"
To
HttpClient User Discussion <ht...@jakarta.apache.org>
cc
Subject
Re: after executing a PostMethod I still see the login page
Roland Weber wrote:
> You have to add parameter "w" with value "password".
> Hidden input fields are still input fields.
It works, thanks.
But now I have another problem...
To commit a search I have to use an URI like this:
http://localhost:4711/?ses=1033124645&w=search
where ses number changes every times.
How may I get the actual session number? It seems not to be stored in a
cookie (page works also if I disable cookies in my browser)
Thanks again in advance.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
Re: after executing a PostMethod I still see the login page
Posted by Daniele Dellafiore <il...@fastwebnet.it>.
Roland Weber wrote:
> You have to add parameter "w" with value "password".
> Hidden input fields are still input fields.
It works, thanks.
But now I have another problem...
To commit a search I have to use an URI like this:
http://localhost:4711/?ses=1033124645&w=search
where ses number changes every times.
How may I get the actual session number? It seems not to be stored in a
cookie (page works also if I disable cookies in my browser)
Thanks again in advance.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org