This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Can someone please tell me how to ftp from a servlet to a client. I have tried Sun and Apache's ftp client classes, sockets and URLConnection. In all cases the ftp just results in the file being "ftp'd" to the root directory of my account on my web host. The snippet of code I am currently using with a URL Connection is:
Maybe if you describe, exactly, what you are trying to do, someone could help. A servlet is not going to be able to initiate an FTP session with a client unless the client is running an FTP Server.
Originally posted by Ben Souther: Maybe if you describe, exactly, what you are trying to do, someone could help. A servlet is not going to be able to initiate an FTP session with a client unless the client is running an FTP Server.
Susan
Greenhorn
Joined: Mar 18, 2005
Posts: 5
posted
0
I have a number of files on my anonymous ftp site on my web server. I want to programmatically download these to client machines without revealing the program locations.
"Susan (moose) nospamthanks", we're a friendly bunch here at the Ranch, but one rul we take quite seriously is the one about display names. You can read about it here.
Basically we require your display name to be two words: Your first name, a space, then your last name. Obviously fictitious names are not allowed.
Please edit your profile and select a valid display name. Acounts with invalid display names get deleted, often without warning
thanks, Dave.
Susan
Greenhorn
Joined: Mar 18, 2005
Posts: 5
posted
0
Originally posted by Ben Souther: Try something like this....
"Susan Nospamthanks", sorry, this is still fictitious and not allowed. Please try again.
thanks, Dave.
Susan
Greenhorn
Joined: Mar 18, 2005
Posts: 5
posted
0
I have attempted the code as indicated above, however, although it got me to the point of saving the file to the client, the downloaded file was only 1K.
I set the mime content to "application/octet-stream" to indicate the files were of type "bin" and/or "exe". I have tried both the buffered byte read and the byte-by-byte file reads and it makes no difference. I have checked the ulimit on the host and it says "unlimited". Any idea what might be the problem?
Susan, Out of respect for the moderators, who are trying to maintain a professional environment here, many people (myself included) will refrain from continuing converstaions with someone until they have complied with any outstanding requests from the said moderators.
(fix your name: <first-name> <last-name> )
-Ben [ March 21, 2005: Message edited by: Ben Souther ]