This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic