commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Hudak" <charles.hu...@cardionet.com>
Subject RE: [VFS] SFTP with special char user/pass
Date Mon, 21 Jun 2004 21:01:15 GMT
I'm thinking that you need to url encode the string to deal with the
meta character. You should usually do this anyways.

You can use the UrlEncoder class for this purpose.

-----Original Message-----
From: Darren Hartford [mailto:dhartford@ghsinc.com] 
Sent: Monday, June 21, 2004 1:54 PM
To: commons-user@jakarta.apache.org
Subject: [VFS] SFTP with special char user/pass


Hey all,
Has anyone ran into the scenario where the username has a special char
in it?  I have one SFTP account that uses the '\' character (a single
one).

==code==
String server = "server1";
String user = "my\\user";
String pass = "password";
String connectionstring = "sftp://"+user+":"+pass+"@"+server;
FileSystemOptions fileSystemOptions = new FileSystemOptions();
SftpFileSystemConfigBuilder.getInstance().setUserInfo(fileSystemOptions,
new TrustEveryoneUserInfo()); FileObject mydata =
mySFTPProvider.resolveFile( connectionstring ,fileSystemOptions ); ==end
code==

I've tried using single-quote/apostrophe ' char to surround the
username, but that didn't seem to help.  Any ideas?

-D




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message