[jcifs] Re: InvalidOperationException

Shane shane.downey at epa.qld.gov.au
Tue Mar 29 02:33:23 GMT 2005


Michael B Allen <mba2000 <at> ioplex.com> writes:

> I don't know what you're trying to do exactly but allow me to make a few
> suggestions.
> 
> 1) You only need to register the SMB URL handler if you're using smb://
> URLs with the java.net.URL class. If you're not, I strongly recommend
> *not* installing it because it can screw up URL functionality (e.g. HTTP
> POST through java.net.URL will not work).
> 2) Use an NtlmPasswordAuthentication object to manage credentials. You
> should never put creds into a URL. That's only for quick and dirty type
> stuff and those special characters ';' ' <at> ' and ':' can cause problems.
> 3) Run your code without a container first to make sure it works as expected.
> 
> Mike
> 
> 
Hi Mike thanks for the ideas. All i'm trying to do is move a directory of files 
to another directory. The location of these directories will be on a fileserver 
somewhere. The webapp needs to authenticate in order to do this. My thinking 
was to use the SmbFile class to manage this, but i'm told using the smb:// URL 
addressing style won't work on our network, and neither will http://

Cheers
Shane





More information about the jcifs mailing list