我在wicket中写了一个面板,让我上传一个文件,它完全可以工作。
但是当我把在其他形式(wicket:id="outerForm"
)该面板,并上传文件时,它抛出从(component id= outerForm
)异常:
在使用FileUpload时嵌套窗体上的检票窗问题
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.
但outerform
我已经打电话form.setMultipart(true)
没有人知道如何解决它?
我使用1.4.21检票
感谢
你不试图通过AJAX提交外部表单吗?另外检查你是否真的使用POST方法提交外部表单。 –
是的,我通过AJAX提交外部表单。问题已解决。是我的错。还有一个外部形式。它工作正常。你需要为所有表单编写'form.setMultipart(true)'。 –