I have an AbstractCommandController and a command bean that binds 4 small files from a request successfully;
however, a fifth file is too large for this tactic so I'm trying to access it using a CommonsMultipartResolver (and a MultipartHttpServletRequest derived from it).
But the request is empty of any files! even though the other files were bound to the command object successfully! Does Spring strip these files from the request somewhere in the workflow? Any ideas?
The above code indicates an empty Request when ran (i.e. doesn't print anything to the console). :shock:Code:protected ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception { String fNm; Iterator iter; try { MultipartHttpServletRequest multipartRequest; multipartRequest = multipartResolver.resolveMultipart(request); iter = multipartRequest.getFileNames(); while (iter.hasNext()) { fNm = (String) iter.next(); System.out.println(" File = " + fNm); } } catch (MultipartException pE) { System.out.println(" " + pE); }


Reply With Quote