if(multipartRequest != null) {
FileItem file = multipartRequest.getFileItem(clientId);
if(file != null) {
UploadedFile uploadedFile = new DefaultUploadedFile(file);
if(fileUpload.getMode().equals("simple"))
fileUpload.setSubmittedValue(uploadedFile);
else
fileUpload.queueEvent(new FileUploadEvent(fileUpload, uploadedFile));