Malformed URL error when using 'temp_client@domain.com' FTP user name
I've got a very quick question for you guys.
I've been testing a simple FTP upload program and I tested it with my main FTP account and it worked fine.
URL url =new URL("ftp://user:pass@ftp.domain.com/" + inputFile.getName());
I've now set up an new FTP account with my hosting provider and restricted it to a specific directory called "temp_client" on the server for security reasons. However, my hosting provider has automatically given the username as "temp_client@domain.com" and there's no way for me to change it. This gives the following code:
URL url =new URL("ftp://temp_client@domain.com:pass@ftp.domain.com/" + inputFile.getName());
Obviously Java gets confused because there are two @ symbols in the URL. My question is: is there a way of using the username temp_client@domain.com successfully without confusing Java?
Thanks.
Message was edited by:
shookster

