• Post Reply Bookmark Topic Watch Topic
  • New Topic

oreilly servlet library question

 
Rob Edmonton
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I'm developing a site (for personal use) and I'd like to be able
to upload images.
The oreilly upload library that I downloaded today has methods
to save the file on the server where the code is kept.
I, however, would like upload to a different account on the
server. So, my page is on www.someServer.com/~page
and I'd like to upload to www.someServer.com/~files .

The server (www.mycgiserver.com) supports FTP uploads.
How would I go about coding a servlet to achieve this?
Do I:
-save the file in a temp directory on the ~page account
-create a Socket, mySocket, and connect to the ~files account
using my FTP username/password
-feed the file to mySocket.getOutputStream()
-delete the file from the ~page account
???
Is this an acceptable method? Is there another easier way?
Can anyone offer advice / pseudocode if I'm terribly off-track?
Thank you muchly,
Rob
 
Rob Edmonton
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was directed to check out an ftp library. It seems to be what I'm looking for.
link: http://www.enterprisedt.com/downloads/ftp.html
-Rob
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!