Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File Upload

 
ford Darcy Jr
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic