commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: [HttpClient] How to use HttpClient with Form-based Authentication?
Date Wed, 08 Sep 2004 12:41:35 GMT

" You should be posting the logon request to /j_security_check, not 
I posted to "/logintest/j_security_check" and it worked!!!

Thanks Oleg for your help, I owe you one.

                PostMethod authpost = new PostMethod(
                // Prepare login parameters
                NameValuePair action   = new NameValuePair("action", 
                NameValuePair url      = new NameValuePair("url", 
                NameValuePair userid   = new NameValuePair("j_username", 
                NameValuePair password = new NameValuePair("j_password", 
                  new NameValuePair[] {action, url, userid, password});

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message