You can download the package com.oreilly.servlet.MultipartRequest from
http://www.servlets.com/cos/cos-27May2002.zip the package is free for noncommercial use.. otherwise you shoud buy the book.. read
http:// www.servlets.com/cos/license.html for further information
after you have downloaded the package.. simply create 2 .jsp's like following:
upload_form.jsp
------------
<%@ page import="com.oreilly.servlet.MultipartRequest" %>
<form action="save.jsp" method="post" enctype="multipart/form-data">
... <input type="file" name="upload_file"> ...
</form>
save.jsp
-----------
<%
MultipartRequest multipart =
new MultipartRequest(request, dirName,500*1024); // 500 KB max POST size
File f = multipart.getFile("upload_file");
String fileName = multipart.getAbsoluteFilesystemName(name);
%>