Forums Register Login

Saving upload file to a specific folder in server

+Pie Number of slices to send: Send
Hi all,

As I recognize that when we upload a file to server by servlet, it will be stored in a tempory place. Then these files may be deleted for some reason. I wonder how can we store them in a specific folder in server such as: "C:/fileupload/"? Does anyone have solution about this?

Thanks and regards,


+Pie Number of slices to send: Send
Files can be uploaded wherever you want using the upload package of your choice. There is a JSP FAQ entry on this subject.
+Pie Number of slices to send: Send

Specifically, I'm using org.apache.commons.fileupload package, so when saving a file to server, I know only giving the relative address such as: "/upload/", and this address belongs to a folder that we built web-app in server.



Sorry for my stupid question, I don't know how to give the absolute address of a folder in server in this case.
+Pie Number of slices to send: Send
Have you read the user manual?
It's never done THAT before. Explain it to me tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 4547 times.
Similar Threads
Uploading file not working
Help on org.apache.commons.net.ftp
Apache cannot recognize folder
Why fast upload and slow downloads ?
exe file in server side
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 05:57:44.