this code is not working.
try {
FileItemFactory factory=new DiskFileItemFactory();
ServletFileUpload upload=new ServletFileUpload(factory);
String location="D:\tem";
File saveto=new File(location);
DiskFileItemFactory factorys=new DiskFileItemFactory();
FileItem items=null;
factorys.createItem(items.getFieldName(), items.getContentType(), false,"field1");
DiskFileItem fi=new DiskFileItem("field1", items.getContentType(), false, "mypic.png", 10000, saveto);
//MultipartFile f = new CommonsMultipartFile(fi);
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}