• Post Reply Bookmark Topic Watch Topic
  • New Topic

Upload client files to a server using JSP

 
Mohammed Zeeshan Ahmed
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to know how to upload client files to server. Eg Assume I am building web app wherein i allow user to upload image, audio or video files through input type=file tag. I want this file to get stored on server along a path say movies/mymov.fla . Assume webserver as apache or websphere
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
408
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohammed,
Welcome to JavaRanch! From the JSP side, it's easy - just use a form with a file upload button. The servlet you submit the request do will do all the work. You'll need to write that servlet to accept the file and write it out to the desired directory.

Note there are open source libraries to deal with the multipart request for the file upload.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a FAQ entry on exactly this subject. Please be sure to check the FAQs before posting.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!