This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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

FTP file from web-form via Servlet

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all.

I've got a problem which Im struggling to figure out. I'm trying to let users upload their videos using a Servlet but I want the file to go to a remote file server (not local). I know how to upload files from a web-form and I know how to FTP files but I dont know how to directly FTP a file from a web-form to a remote file server without the file going anywhere near the local server. Is this possible? The process is as follows...

web-form->FTP->remote file server. (the local file system must not be involved).

Help much appreciated!
 
Saloon Keeper
Posts: 6594
161
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A web form submits to a servlet, no way around that. But the servlet can turn around and upload the file elsewhere via ftp, e.g. by using the Apache Commons Net library. The Apache Commons FileUpload library could be used to handle the servlet part of accepting the uploaded file.
 
Michael Portman
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:A web form submits to a servlet, no way around that. But the servlet can turn around and upload the file elsewhere via ftp, e.g. by using the Apache Commons Net library. The Apache Commons FileUpload library could be used to handle the servlet part of accepting the uploaded file.



Yeah I thought it wasn't possible. I'll just have to do it the traditional way then. Thanks for the help though!
 
Michael Portman
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:A web form submits to a servlet, no way around that. But the servlet can turn around and upload the file elsewhere via ftp, e.g. by using the Apache Commons Net library. The Apache Commons FileUpload library could be used to handle the servlet part of accepting the uploaded file.



...sorry forgot to add something... So your saying the file needs to be uploaded to the local server first? Before the file is FTP'd?
 
I can't take it! You are too smart for me! Here is the tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic