[jcifs] Re: jcifs-0.9.4 released (fwd)
eric.glass at gmail.com
Thu Jul 1 17:46:01 GMT 2004
> That assumes that the rest of jCIFS will run ok without loading the handler.
> In theory I think it should but jCIFS needs that to do *anything* with SMB
> URLs. All SmbFiles are created through java.net.URL.
SmbFile explicitly calls out the handler (specifying
Handler.SMB_HANDLER) when it creates the URLs; that allows us to use
SmbFiles without installing the SMB URL handler directly. That's
actually a good thing, since it removes the requirement that the jCIFS
jar needs to be installed in the system classloader (allowing i.e.
Davenport to be completely self contained, using the webapp's
classloader). Registering the URL handler explicitly (via
Config.registerSmbURLHandler()) is only needed if you want to do:
URL url = new URL("smb://server/");
url = new URL("http://server/");
with automatic support for NTLM authentication. Without registering
the handler, you can still do:
SmbFile file = new SmbFile("smb://server/");
and (I believe, but untested):
URL url = new URL("http://server"); // no support for NTLM
URLConnection conn = url.openConnection();
conn = new NtlmHttpURLConnection(conn); // support added for NTLM
More information about the jcifs