struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject Re: multipart-request / file upload problem
Date Mon, 01 Mar 2004 11:33:21 GMT
I'm going to put this another way: what's the secret with file upload 
requests? I can't see my file parameter in the request parameters when I 
submit the form with the multipart-request.

Adam

On 02/29/2004 07:05 PM Adam Hardy wrote:
> I use the Commons multipart request handler stuff to set up a 
> DynaActionForm properly for my file upload so:
> 
> <form-bean  name="linklibImportForm"
>   type="org.apache.struts.validator.DynaValidatorActionForm">
>   <form-property name="bookmarksFile"
> type="org.apache.struts.upload.CommonsMultipartRequestHandler$CommonsFormFile"/> 
> 
> </form-bean>
> 
> which works fine, but in some circumstances I want to manually create 
> this form, grab the file and save the DynaActionForm (in a filter). Like 
> so:
> 
> ActionForm form =
>   RequestUtils.createActionForm(request, actionMapping,
>   moduleConfig, actionServlet);
> form.reset(actionMapping, request);
> BeanUtils.populate(form, request.getParameterMap());
> 
> But it isn't working. My file comes back as null. Anyone know why or 
> have a solution?
> 


-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message