Thank you! This was precisely what I needed.
> -----Original Message----- > From: Dan Eklund [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 12, 2003 2:24 PM > To: Struts Users Mailing List > Subject: Re: getting multipart requests > > > I just went through this myself... > > I don't know anything about the setMultipartRequestHandler() method, > but what I did was set the "file" data type to be of type > > org.apache.struts.upload.FormFile > > once you have this object, you can customize the file name, etc.... > see the javadocs: > http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/u > pload/FormFile.html > > > > > > > I've been scratching my head over how to get multipart data across the > wire, > and I was wondering if I could get a little help. Given the following in > my > .jsp: > > <html:form action="/FileUploadSubmit" enctype="multipart/form-data" > method="POST"> > <html:file property="file"/> > <html:submit/> > </html:form> > > (the "FileUploadSubmit" Action has an ActionForm called "FileUploadForm") > > How should I set up my Action and ActionForm? For instance: > - What data type should the member "file" be in the ActionForm? > - Where / when / should I call setMultipartRequestHandler() in the > ActionForm? > - How do I make sure the handler gets called correctly? > - I'm assuming I should be using CommonsMultipartRequestHandler (is this > true?) > - How do I customize what happens to the file once it comes in? (i.e., > filename, destination directory, etc.) > > I haven't been able to find any sample code, and both of my Struts books > have been a bit unhelpful (although in general I've been very happy with > "Struts in Action"). Any help would be tremendously appreciated! > > Daniel > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]