commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Comer" <bill.co...@lammtara.com>
Subject RE: FileUpload documentation confusing
Date Tue, 01 Jul 2003 15:37:24 GMT
Rhino, 
  How did you set up iter ?

The following works for me...

		Iterator fileHandler = fileItems.iterator();
            while ( fileHandler.hasNext() )
            {
                    FileItem fi = (FileItem)fileHandler.next();
			.......
            }

Bill

-----Original Message-----
From: Rhino [mailto:rhino1@sympatico.ca] 
Sent: 01 July 2003 16:29
To: Jakarta Commons Users List
Subject: Re: FileUpload documentation confusing


Thanks, I already figured that part out ;-)

Can you tell me what I need to do to get the loop working? I get a
ClassCastException when I execute the line:

FileItem item = (FileItem) iter.next();

I watched it in the Eclipse debugger and saw that the items in the
iterator were DefaultFileItems so I changed the above line to say:

DefaultFileItem item = (DefaultFileItem) iter.next();

but this also gave me a ClassCastException. What can I do to resolve
this problem?

Rhino

----- Original Message ----- 
From: "Will Stranathan" <wstranathan@hotmail.com>
To: <commons-user@jakarta.apache.org>
Sent: Tuesday, July 01, 2003 10:50 AM
Subject: Re: FileUpload documentation confusing


> A patch was submitted yesterday to update the documentation.  That 
> should
> be:
>
> DiskFileUpload upload = new DiskFileUpload();
>
> Regards,
> Will
>
>
> >From: "Rhino" <rhino1@sympatico.ca>
> >Reply-To: "Jakarta Commons Users List" 
> ><commons-user@jakarta.apache.org>
> >To: "commons-user" <commons-user@jakarta.apache.org>
> >Subject: FileUpload documentation confusing
> >Date: Tue, 1 Jul 2003 08:30:57 -0400
> >
> >I'm trying to use FileUpload 1.0 for the first time but I'm finding 
> >the documentation confusing. I'm referring to the "Using" document at

> >http://jakarta.apache.org/commons/fileupload/using.html.
> >
> >According to this document, the first line I need after verifying 
> >that
the
> >input is multipart is:
> >
> >FileUpload upload = new DiskFileUpload();
> >
>
> _________________________________________________________________
> The new MSN 8: smart spam protection and 2 months FREE* 
> http://join.msn.com/?page=features/junkmail
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003
 


Mime
View raw message