[jcifs] JCIFS NTLM Authentication for HTTP Connection

bhavani bhavaani_vee at yahoo.co.in
Tue Jun 6 20:35:01 GMT 2006


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.

Thanks
Bhavani.





More information about the jcifs mailing list