Results 1 to 2 of 2
  1. #1
    amit_m04 is offline Member
    Join Date
    Mar 2009
    Rep Power

    Default upload and download file using servlet

    can any one pls help me with code for this, as i want to upload any file on to a folder on server from client using servlet and also i should be able to download any file that i have uploaded.. plsszzz help me on this ...

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Rep Power


    there is that apache jakarta commons-fileupload project. their site has some good documentation and samples for using this on its own or with other things like struts.

    the basics are the html form specifying the content-type of multipart form and to have a server side handler that can interpret the http multi-part sections, which is tedious to do by hand, which is why the use of existing api like commons-fileupload is a good idea. it depends on commons-logging and commons-io modules, but in practice the 3 jar files to add to your webapp is well worth it.

    downloading will need to be handled by your own servlet though.

Similar Threads

  1. Replies: 6
    Last Post: 06-04-2009, 11:09 PM
  2. Replies: 1
    Last Post: 11-06-2008, 04:47 AM
  3. Replies: 8
    Last Post: 08-26-2008, 04:50 AM
  4. File Upload Servlet problem
    By jeniramires in forum Advanced Java
    Replies: 3
    Last Post: 08-18-2008, 07:34 PM
  5. how to upload a file using servlet
    By simon in forum Java Servlet
    Replies: 1
    Last Post: 08-05-2007, 03:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts