@RequestMapping(value = "/upload", method = RequestMethod.POST) public DoxModelAndView upload(HelloForm form) { try (OutputStream stream = new BufferedOutputStream( new FileOutputStream( Paths.get("//LS-XHLE38/share/var/", form.getFileName()).toFile()))) { stream.write(form.getFile().getBytes()); addMessage(new AppMessage(INFO, "completes.upload")); } catch (Exception e) { LOG.info("message = {}, stacktrace = {}", e.getMessage(), e.getStackTrace()); } return view("/hello/hello.html", form); }