> -----Original Message-----
> From: Mark Silva [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 20, 2002 1:28 PM
> To: Struts Users Mailing List
> Subject: RE: file upload problem
> 
> 
> I am using version 1.0.2.  

I would strongly encourage you to move to Struts 1.1-b2 if you can. It uses
a new file upload implementation which is faster and much more robust than
the one in 1.0.2. No code changes are required on your part, since the
interface is the same.

> 
> i went and looked at the example, and found my answer, FileForm.

You mean FormFile. ;-)

> 
> now i have another question, that may be a silly one, but is 
> there any reason I shouldn't turn the contents of the 
> FileForm into a String, and then run StringTokenizer over it? 
>  This is a csv file, that i am importing into the database.

You mean using getFileData()? That's OK as long as you are completely sure
that the file is always going to be small. However, if you might ever have
to process a large upload, then you should use getInputStream() to avoid
running out of memory. Once you have the input stream, you can do whatever
you like with it. Do remember to close it when you're done, though.

--
Martin Cooper


> 
> thanks,
> mark
> 
> 
> -----Original Message-----
> From: Martin Cooper [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 20, 2002 12:43 PM
> To: 'Struts Users Mailing List'
> Subject: RE: file upload problem
> 
> 
> What version of Struts are you using?
> 
> You should take a look at the sources for the struts-upload sample
> application that comes with Struts. That will give you a 
> working example to
> refer to.
> 
> --
> Martin Cooper
> 
> 
> > -----Original Message-----
> > From: Mark Silva [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, September 20, 2002 12:41 PM
> > To: Struts Users Mailing List
> > Subject: file upload problem
> > 
> > 
> > hello again,
> > 
> > so i am trying to implement a file upload feature in my 
> > application, and i think i have everything setup correctly, 
> > but i am getting this error on submission.
> > 
> > javax.servlet.ServletException: BeanUtils.populate
> > java.lang.IllegalArgumentException: argument type mismatch
> > 
> > i feel that this might be due to the type of the file field 
> > in the Form object.  right now it is string (as is 
> everything else). 
> > 
> > should the file type is a form object be something different?
> > 
> > thanks,
> > mark
> > 
> > --
> > To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to