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:[EMAIL PROTECTED] 
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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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" <[EMAIL PROTECTED]>
> >Reply-To: "Jakarta Commons Users List" 
> ><[EMAIL PROTECTED]>
> >To: "commons-user" <[EMAIL PROTECTED]>
> >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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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


---
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
 


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

Reply via email to