hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Philippi <alex_phili...@yahoo.de>
Subject How to handle this FORM base authentication with httpclient
Date Wed, 14 Nov 2007 14:25:43 GMT
I have to send a xml stream to a destination and log into a FORM based login dialog.

I analyzed the Sourcecode of the login page and thats the result:


<form method="post" action="/names.nsf?Login" name="_DominoForm">
<input type="hidden" name="%%ModDate" value="000BF36800070000"> 
<input name="httpcookie" type="hidden" value="CHANGING_SESSION_ID">

<input type=hidden name="pval" value="URL">
<input type=hidden name="db" value="URL">
<input type=hidden name="tct" value="Default">
<input type=hidden name="tct2" value="">
<input type=hidden name="tct3" value="">
<input type=hidden name="tcten" value="__main__">

<input type=hidden name="tcten2" value="">
<input type=hidden name="tcten3" value="">


Username<br><input name="Username" value="" size=17 maxlength=50 class="psmall"><br>
Password<br><input name="Password" value="" type="password" size=17 maxlength=50
onkeypress="var keyCode = document.layers ? event.which : document.all ? event.keyCode : event.keyCode;

if (checkuser() == false) { return false }
}" class="psmall"><br>
<a class=textlink href="#" onclick="if (checkuser() == false) { return false };document.forms[0].submit()"><u>Log
on again</u></a><br>

</TABLE><input type=hidden name="redirectto" value="OTHERURL">
<input type="submit" value="Log in"></noscript>


First I filled the input tags in corresponding NamValuePair Objects an added them with post.setRequestBody(
new NameValuePair[] {...}= to the postMethod. After that I tried to add the input parameters
with post.setParamaters(...).
Nothing worked for me. Any tips how I can login? Could I have got issues because there is
a lot of javascript on the login page?

I hope you could help me

      Heute schon einen Blick in die Zukunft von E-Mails wagen? www.yahoo.de/mail
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message