Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I upload a file(*.doc,*.zip...) within a servlet?

 
dx wu
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to upload a file within a servlet,How to do? thanks!
 
Mat Robinson
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you need to do is use the HTML input tag with type file. This will allow you to upload things from the page as a multipart request.
Check out http://www.onjava.com/pub/a/onjava/2001/04/05/upload.html for a full description.
Mat.
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use jspsmartupload or the oreilly classes..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic