hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@urbancode.com
Subject RE: HTTPS connection example
Date Fri, 03 Mar 2006 14:09:57 GMT
If your login form is on https://web.xxx.com/yyy/zzzz/login.html
then your post should be to https://web.xxx.com/yyy/zzzz/sso?cmd=LOGIN
(the relative page url specified by the "action=" value of FORM )
and set the querry string for "Login" and "user" values

>
> So more info that might help someone answer my questions...
>
> <FORM action="/sso?cmd=LOGIN" method="POST" name="login">
> 	<INPUT TYPE="hidden" NAME="auth_mode" VALUE="basic">
> 	<INPUT maxLength=32 name=user size=13 value="">
> 	<INPUT TYPE="button" onClick="formSubmit();" VALUE="Login">
> </FORM>
>
> function formSubmit() {
>  document.login.user.value = document.login.user.value.toUpperCase();
>  document.login.submit();
> }
>
> Page info:
>
> Server: Apache
> WWW-Authenticate: Basic realm="SCRealm"
> Pragma: No-cache
> Cache-Control: no-cache
> Keep-Alive: timeout=60, max=95
> Connection: Keep-Alive
> Transfer-Encoding: chunked
> Content-Type: text/html
>
>
>
>
> -----Original Message-----
> From: Jeffrey Porter [mailto:J.Porter.1@warwick.ac.uk]
> Sent: 03 March 2006 10:57
> To: HttpClient User Discussion
> Subject: RE: HTTPS connection example
>
>
> Hi Roland,
>
> Thanks for the response.
>
> I've made some progress, but do have a couple of questions.
> May be you can help? (or anyone else)
>
> ....
>
> I've successfully used the "GetMethod" class to connect to the URL.
> The "authget.getResponseBody()" contains the page with the login form.
> The response code is 200 OK.
>
> I now want to use a "PostMethod" to send the login details back.
>
> The "PostMethod" contructor takes a URL, what is this URL for? Is it the
> same that used for the "GetMethod"?
>
> The examples show...
> "authpost.setRequestBody(new NameValuePair[] {action, url, userid,
> password});"
> What is the 'action' & 'url' that is passed in used for?
> Do I just specify the same URL as before?
> Do I need to pass in an 'action'? and how do I know what it will be?
>
> ....
>
> Ok, that that was more like 6 questions, than a couple.    :-)
>
> Jeff
>
>
>
> -----Original Message-----
> From: Roland Weber [mailto:ROLWEBER@de.ibm.com]
> Sent: 03 March 2006 10:32
> To: HttpClient User Discussion
> Subject: Re: HTTPS connection example
>
> Hello Jeff,
>
> is this decent enough?
>
> http://jakarta.apache.org/commons/httpclient/index.html
> http://jakarta.apache.org/commons/httpclient/sslguide.html
> http://jakarta.apache.org/commons/httpclient/authentication.html
>
> You probably don't need to know the authentication mechanism.
> But you do need to know whether there is one.
>
> cheers,
>   Roland
>
>
>
>
> "Jeffrey Porter" <PORTER_J@WMGMAIL.wmg.warwick.ac.uk>
> 03.03.2006 10:25
> Please respond to
> "HttpClient User Discussion"
>
>
> To
> <httpclient-user@jakarta.apache.org>
> cc
>
> Subject
> HTTPS connection example
>
>
>
>
>
>
>
>
> Hello all,
>
>
>
> I'm new to HTTP-client, so please be gentle :-)
>
>
>
> I'm trying to make a connection to a website
> (https://web.xxxx.com/AS/Journal/).
>
>
>
> How do I tell the authentication mechanism it uses? Do I need to know?
>
>
>
> Is there a simple example/tutorial on HTTPS connections? (other than the
> FormLoginDemo.java)
>
>
>
> Is there a decent website to start learning from?
>
>
>
> Thanks
>
> Jeff
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message