wood burning stoves*
The moose likes Servlets and the fly likes Upload file using servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Upload file using servlet" Watch "Upload file using servlet" New topic
Author

Upload file using servlet

felix thomas
Ranch Hand

Joined: Jun 10, 2001
Posts: 89
hi,
Can anyone show a sample code how to upload a file to a server using servlets. I don't what any third party tool. I am making a servlet which will get from the user the path of the file ,then i have to upload it.
I want the complete code or example how it can be done.
rick zorich
Greenhorn

Joined: Aug 31, 2003
Posts: 16
You don't need any thrid party packages. If you have JavaMail in your classpath, then you could use it's methods to parse the multipart request.
Here is demonstration JSP. Please share your final code with us.
Sean Sullivan
Ranch Hand

Joined: Sep 09, 2001
Posts: 427
Jakarta Struts has file upload capabilities.
If you aren't using Struts, look at these libraries:
http://jakarta.apache.org/commons/fileupload/
http://www.servlets.com/cos/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Upload file using servlet