I have a problem downloading a file using spring webflow 1.0 and struts 1.3.
jsp looks something like this:
<html:form action="/flowAction" method="post" enctype="multipart/form-data">
<html:file property="file" name="attachDocumentsForm" size="50"/>
</html:form>
The form looks something like this:
public class AttachDocumentsForm extends SpringBindingActionForm {
private FormFile file;
}
Now my problem is that when I submit the form, the field is filealways null. Other fields on the form fill out correctly, and if I dig RequestContext, I can find a file that is deeply littered with some data structures.
Here's a terribly ugly way I can get when embedding:
ServletExternalContext servletExternalContext = (ServletExternalContext) context.getExternalContext();
ActionForm form = (ActionForm) servletExternalContext.getRequest().getAttribute("actionForm");
FormFile file = (FormFile) form.getMultipartRequestHandler().getFileElements().get("file");
I noticed that MultipartRequestHandlerin my form null, and I suspect that this may be part of the problem, but I tried filling it with an instance to CommonsMultipartRequestHandlerno avail.
What do I need to do so that the field is filefilled in correctly?