UploadForm myForm = (UploadForm)form;
int productId = myForm.getProductId();
// Process the FormFile
FormFile myFile = myForm.getUploadFile();
String fileName = myFile.getFileName();
byte[] fileData = myFile.getFileData();
FileOutputStream out = new FileOutputStream(getFilePath()+"/"+fileName);
out.write(fileData);
out.close();
ProductManager.updateProductById(productId,"FILENAME",fileName);
return mapping.findForward("success");