Originally posted by Subrahmanyam Baratam:
Hi,
There is a requirement of file upload in our project.The task is finished but the change request came to me is to upload the file in different system.
Let me explain in detail...currently why the user hits the browse button and uploads the file, the file is getting uploaded in server in particular location, but as per the Change Request i need to upload this file in different system. This is entirely new to me, please share your valuable ideas.
Thanks in advance,
baratam.
As said before, the first step is to determine how the server could access the filesystem of that another system.
There are many ways to achieve this, but here are two most recommended ways:
1) Mapping the filesystem of the other system as a network disk in the server so that you can just use java.io.File to write it there.
2) Running a FTP server in the other system so that you can use for example Apache Commons FTPClient to connect it and send the file there using
Java.
The alternative ways below are less recommended:
3) Running a database like MySQL in the other system so that you can use
JDBC API to store the file in the database.
4) Running a HTTP server like Apache
Tomcat and using Apache Commons HttpClient to send the file to there using a Java application and Apache Commons FileUpload to receive and store the file using a servlet.