@RequestMapping(value = "form-upload-file", method = RequestMethod.POST)
	public String fileUploaded(@RequestParam("email") String email, Model m,
			UploadedFile uploadedFile, BindingResult result) {
		if (result.hasErrors()) {
			String errmsg = "";
			for (ObjectError err : result.getAllErrors()) {
				errmsg = errmsg + err.toString() + "<br />";
			}
			m.addAttribute("errorFormMessage", "File upload failed: <br />" + errmsg);
			return "upload/formUploadFile";
		}

		// upload
		try {
			uploadFile(m, uploadedFile);
		} catch (UploadFailedException ex) { //is logged
			m.addAttribute("errorFormMessage", ex.getMessage());
			return "upload/formUploadFile";
		}

		// validation
		try {
			validator.validatePom(uploadedFile.getFileName(), email);
		} catch (IOException ex) {
			log.log(Level.SEVERE, "an exception was thrown", ex);
		}

		m.addAttribute("successFormMessage", null);
		m.addAttribute("id", uploadedFile.getFileName());
		return "redirect:/result/result";
	}