[jcifs] JCIFS NTLM Authentication for HTTP Connection
Michael B Allen
mba2000 at ioplex.com
Tue Jun 6 22:08:52 GMT 2006
On Tue, 6 Jun 2006 20:35:01 +0000 (UTC)
bhavani <bhavaani_vee at yahoo.co.in> wrote:
> Hi,
>
> I am using the following code to establish connection to an intranet host. Its
> using ntlm authentication..
> .
> .
> jcifs.Config.registerSmbURLHandler();
> jcifs.Config.setProperty("jcifs.smb.client.domain",domainname);
> jcifs.Config.setProperty("jcifs.smb.client.username",user);
> jcifs.Config.setProperty("jcifs.smb.client.password",psw);
> jcifs.Config.setProperty("jcifs.http.domainController",myhost);
>
> URL url = new URL("http://myhost/oraclebam/");
> BufferedReader reader = new BufferedReader(
> new InputStreamReader(url.openStream()));
> String line;
> while ((line = reader.readLine()) != null) {
> System.out.println(line);
>
> But I am not able to connect to the server. I am getting a HTTP response code:
> 401.
>
> Can any one give advice to solve this.
Read this:
http://jcifs.samba.org/src/docs/httpclient.html
--
Michael B Allen
PHP Extension for SSO w/ Windows Group Authorization
http://www.ioplex.com/
More information about the jcifs
mailing list