I am trying to upload a file.
First I created a form with several fields and a command and everything worked fine. Then I added file field, changed the encryption type to multipart/form-data, added multipartResolver to the definitions. My problem is that request does not seem to pickup any input values now.
I added the following code to my contoller:
and I got the following in the log:Code:MultipartHttpServletRequest mRequest = (MultipartHttpServletRequest) request; Enumeration enum = mRequest.getAttributeNames(); while (enum.hasMoreElements()) { String element = (String) enum.nextElement(); log.debug(element + ":" + mRequest.getAttribute(element)); }
It looks like my input values are not picked by the request.Code:org.springframework.web.servlet.DispatcherServlet.THEME:org.springframework.web.servlet.theme.FixedThemeResolver@45215 org.springframework.web.servlet.DispatcherServlet.CONTEXT:org.springframework.web.context.support.XmlWebApplicationContext: display name ... org.springframework.web.servlet.DispatcherServlet.MULTIPART:org.springframework.web.multipart.commons.CommonsMultipartResolver org.springframework.web.servlet.DispatcherServlet.LOCALE:org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver@d66ecc
What am i doing wrong?


Reply With Quote