-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Servlet 3 multipart parameter binding does not work on Weblogic12c (12.1.2.0) [SPR-11074] #15700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Kazuki Shimizu commented I tried to the following code. [Controller]
Input value(description) was outputted to console. |
Rossen Stoyanchev commented It works on Tomcat and Resin but not WebLogic is that correct? You can try stepping through WebRequestDataBinder.bind with a debugger. |
Kazuki Shimizu commented Thanks for giving the information for debug.
note: |
Kazuki Shimizu commented I was debugging... h6.[overview of result] HttpServletRequest#getParameterNames is returnd empty enumeration on weblogic12c. h6.[detail of result] Caller hierarchy is ServletRequestBinder#bind -> ServletRequestParameterPropertyValues(ServletRequest) -> ServletRequestParameterPropertyValues#getParametersStartingWith(ServletRequest, String). h4.[way to solved] h6.[extends class of StandardServletMultipartResolver]
h6.[spring-mvc.xml]
This source is a prototype ... |
Kazuki Shimizu commented But multibyte character was garbage characters when specified enctype="multipart/form-data" on weblogic. ex) CharacterEncodingFilter is already setting. |
Kazuki Shimizu commented added Reference URL of OTN Thread. This thread owner is me. |
Rossen Stoyanchev commented Thanks for debugging. It sounds like a bug in WebLogic. There are parameters but getParameterNames doesn't return their names. |
Rossen Stoyanchev commented I am resolving this for now as it appears to be an issue in WebLogic. Keep in mind you can re-open the issue if necessary. And of course feel free to add further comments, that will likely help others. |
Kazuki Shimizu commented I think it may not be said to be a issue in weblogic ... Servlet 3 specification see following: http://download.oracle.com/otn-pub/jcp/servlet-3.0-fr-eval-oth-JSpec/servlet-3_0-final-spec.pdf?AuthParam=1384191760_2b0fcb1f5298dd0cb12f9e8ce324ef1b What would you say? |
Kazuki Shimizu commented Hi , Rossen! I think implementation of WebLogic are satisfies the API specification of Servlet 3. |
Kazuki Shimizu commented Please see above comment. |
Juergen Hoeller commented If we can't rely on getParameterNames exposing the multipart files, then our StandardMultipartHttpServletRequest will have to override getParameterNames and add the multipart names accordingly (if not already present). We're doing that in DefaultMultipartHttpServletRequest (used with Commons FileUpload) as well, so we should be able to add similar logic to StandardMultipartHttpServletRequest. I'll try that approach tonight, making the fix available in the next 3.2.9 and 4.0.5 snapshots. Would be great if you could give it a try tomorrow... Juergen |
Kazuki Shimizu commented Thanks! |
Kazuki Shimizu commented Thank you resolve this issue. I will apply my application later. and ... e.g.) <form:form action="${pageContext.request.contextPath}/upload/single"
method="post"
enctype="multipart/form-data;charset=UTF-8"
modelAttribute="fileUploadForm"> |
Kazuki Shimizu commented sorry... above comment is wrong. |
Juergen Hoeller commented The snapshots are available in the meantime. Looking forward to your test results... You can find the Maven coordinates for our 3.2.9 & 4.0.5 snapshot releases at: http://projects.spring.io/spring-framework/ It would be great if you could give the same snapshot a try on Tomcat 7 and Resin 4 too (if you have them around, since you mentioned them above). As a side note: In the same commit, I've also addressed #16352 and introduced a "resolveLazily" bean property (default is "false") on StandardServletMultipartResolver. Setting that flag to "true" lazily resolves the multipart content on first access of parameters or files... If you're up for it, you could give that mode a try as well. The advantage there is that multipart parsing exceptions occur as late as possible, typically right there when you access parameters or files, which allows for those exceptions to be treated in handler methods. Juergen |
Kazuki Shimizu commented I confirmed that was resolved the this issue in 3.2.9.BUILD-SNAPSHOT. Thank you for resolve. |
Juergen Hoeller commented Thanks for the immediate feedback! FYI, we'll release both 4.0.5 and 3.2.9 tomorrow night, for public availability on Tuesday. Juergen |
Juergen Hoeller commented On a last minute note, I've added dedicated getParameterMap() merging as well, since that method isn't mentioned in the Servlet spec for file upload purposes either. So StandardMultipartHttpServletRequest overrides both getParameterNames() and getParameterMap() in the same style now, completing the entries if necessary. This is also in line with Juergen |
Kazuki Shimizu commented Additional information: Thanks. |
Kazuki Shimizu opened SPR-11074 and commented
[Execution Conditions]
[Execution Result]
Upload file(MultipartFile) is bound to Form object, but other item is not bound to Form object.
h4.[Example code(overview)]
[jsp]
[web.xml]
[weblogic.xml]
[spring-mvc.xml]
[Form object]
[Controller]
h4.[Detail example code]
Please see following page.
[jsp]
[controller]
h4.Other information
Affects: 3.2.4
Issue Links:
Backported to: 3.2.9
0 votes, 5 watchers
The text was updated successfully, but these errors were encountered: