here is my code
String DESTINATIONDIR = "e://temp//";
boolean isMultipart = ServletFileUpload.isMultipartContent(request);
if (!isMultipart) {
} else {
FileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
List items = null;
try {
items = upload.parseRequest(request);
} catch (FileUploadException e) {
e.printStackTrace();
}
Iterator itr = items.iterator();
while (itr.hasNext()) {
FileItem item = (FileItem) itr.next();
if (item.isFormField()) {
} else {
try {
String itemName = item.getName();
File savedFile = new File(DESTINATIONDIR+itemName);
item.write(savedFile);
out.println("<tr><td><b>Your file has been saved at the loaction:</b></td></tr><tr><td><b>"+DESTINATIONDIR+"\\"+itemName+"</td></tr>");
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
[Message sent by forum member 'arckjmaster' (arckjmaster)]
http://forums.java.net/jive/thread.jspa?messageID=213219