• Post Reply Bookmark Topic Watch Topic
  • New Topic

Saving upload file to a specific folder in server  RSS feed

 
cho con
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,


 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66148
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Files can be uploaded wherever you want using the upload package of your choice. There is a JSP FAQ entry on this subject.
 
cho con
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you read the user manual?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!