2
votes

I know that I can set proxyhost and proxyport for the java application to work through a normal proxy server. But (at least) on corporate networks there are authentication schemes on proxies. I am using URLConnection to download a zip file from internet inside corporate network. I am using Weblogic as server for my application.
I am aware of HTTPClient that claims to deal with the NTLM proxy, but how? I have found no examples nor tutorials that deal with this.

I have been searching web really for a while now and have found out that NTLM proxy authentication is Microsoft's authentication scheme that has no public specification? Is it really true that Java is not capable of dealing with corporate networks (or corporate proxies)? Do I really need to go to the JSP ect. road on this one?

  1. Is it possible to use java application client to access url for download a file through NTLM proxy server? How? Example would really be appreciated.

this is the error that I get

java.io.IOException: Stream closed.
at java.net.PlainSocketImpl.available(PlainSocketImpl.java:428)
at java.net.SocketInputStream.available(SocketInputStream.java:217)
at java.io.BufferedInputStream.read(BufferedInputStream.java:321)
at weblogic.net.http.KeepAliveStream.read(KeepAliveStream.java:86)
at java.io.FilterInputStream.read(FilterInputStream.java:90)
at be.azvub.ext.bcfidownloder.Download.downloadZipFile(Download.java:131)
2

2 Answers

1
votes

have you tried ntlmaps? this is an solution in sourceforge.. it works quite well.

1
votes

I know that JCIFS provides a NTLM implementation, but I am nut sure if it can be combined with HTTPClient. I also believe that Sun/Oracle Java 6 includes a NTLM implementation.

It looks like this page (from 2007) provides an overview of NTLM support from Java.