This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Servlets and the fly likes File Upload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "File Upload" Watch "File Upload" New topic
Author

File Upload

ford Darcy Jr
Ranch Hand

Joined: Jan 26, 2005
Posts: 76
Hi,

I am using multipartrequest for fileupload in servlets. I want to save the file with the new filename on the server. But its getting saved with the original filename. Is there anyway to save the file with a new filename ?

Thanks.
Akbar Basha R
Greenhorn

Joined: Mar 11, 2002
Posts: 23
Upload the file with the original file name and then use the File Class and the renameTo method to change the file name to a new one.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Upload