How can we access files from FTP folder in java web application?
-
What am i doing is uploading some images from client side on to FTP server. I am using FTP client and commons-net.jar to upload the images. I want these images in my Server side application. So plz help me to solve my problem.
-
Answer:
I'm guessing your server side app needs to "read-in" the image. So in your server app at some point you have to read the image from a file in the FTP folder, where the client has uploaded ... Image image = null; try { File file = new File("/home/user/ftp/image.jpg"); image = ImageIO.read(file); } catch (IOException e) { } Anyway, if you running a java web server your clients may upload the image directly with a http PUT request, without going thru FTP.
Datta at Stack Overflow Visit the source
Related Q & A:
- How can i access the number of questions asked on stackoverflow?Best solution by Meta Stack Overflow
- How can I access my localhost from my Android device?Best solution by Stack Overflow
- How can I access file in localhost?Best solution by Stack Overflow
- How can I access my Internet Explorer history?Best solution by wikihow.com
- How can I open files with the extension .ef?Best solution by solvusoft.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.