[jcifs] Re: JCIFS NTLM Authentication for HTTP Connection
bhavani
bhavaani_vee at yahoo.co.in
Wed Jun 7 13:03:25 GMT 2006
Michael B Allen <mba2000 <at> ioplex.com> writes:
>
> 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
>
Hi,
Thank you very much for your response.
I read the link you gave.
But I am still not able to solve the problem. I am trying to establish a
UrlConnection from unix to windows. I am using jdk 1.4.2, jcifs 1.2.9.
Thanks
Bhavani.
More information about the jcifs
mailing list