Since this seems due to a currently unfixed bug in Spring I added a workaround using POST and a different path so it does not confilct with my other POST-Mappings.
Code:/* Usually you would use a mapping to HTTP-PUT in a REST-Application. *Since there is a BUG with multipart-requests and HiddenHttpMethodFilter *we use a different path and the POST-Method here *https://jira.springsource.org/browse/SPR-6594 */ @RequestMapping(value="/scriptfile/{id}/update", method = RequestMethod.POST) public String update(@Valid ScriptFile scriptFile, BindingResult result, ModelMap modelMap, HttpServletRequest request) { if (scriptFile == null) throw new IllegalArgumentException("A scriptFile is required"); if (result.hasErrors()) { modelMap.addAttribute("scriptFile", scriptFile); modelMap.addAttribute("showcases", ShowCase.findAllShowCases()); return "scriptfile/update"; } setFileParameters(scriptFile, request); scriptFile.merge(); return "redirect:/scriptfile/" + scriptFile.getId(); }


Reply With Quote
