• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

oreilly servlet library question

 
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
 
    Bookmark Topic Watch Topic
  • New Topic