pedro abs wrote:I do not want to use the apache project FileUpload because I want to learn how to do this in that way.
pedro abs wrote:Why I have <input type="file">? How can I use it? Could you give-me some example of code?
Bear Bibeault wrote:See the entry in the JSP FAQ on file uploading.
The Servlet and JSP specs do not make any special provisions for multipart requests (file uploads).
Servlet and JSP developers either have to depend on third party libraries or make their own framework for this.
The two most popular are Jakarta Commons FileUpload and com.oreilly.servlet
The file upload form looks just like any other form except that:
the form tag must specify the POST method the form tag must specify an enctype of multipart/form-data the form must contain an <input type=file> element.