FormTester fails if multipart form is not submitted with a file
---------------------------------------------------------------
Key: WICKET-3211
URL: https://issues.apache.org/jira/browse/WICKET-3211
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.5-M3
Reporter: Major Peter
Attachments: wicket-3211.tar.gz
If you have a form with a fileuploadfield, and you try to test it, then if you
don't submit a file with the form, the submit fails with this exception:
Caused by: java.lang.IllegalStateException: ServletRequest does not contain
multipart content. One possible solution is to explicitly call
Form.setMultipart(true), Wicket tries its best to auto-detect multipart forms
but there are certain situation where it cannot.
at
org.apache.wicket.protocol.http.servlet.MultipartServletWebRequestImpl.<init>(MultipartServletWebRequestImpl.java:118)
at
org.apache.wicket.protocol.http.servlet.MultipartServletWebRequestImpl.<init>(MultipartServletWebRequestImpl.java:86)
at
org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:378)
at
org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1379)
See the attached quickstart (TestHomePage.java) for more details.
Note: this type of submit works flawlessly with browser.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.