commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Stranathan" <wstranat...@hotmail.com>
Subject Re: FileUpload documentation confusing
Date Tue, 01 Jul 2003 15:38:34 GMT
DefaultFileItem implements the FileItem interface, so you should not need to 
change that.  Not sure why you're getting a ClassCastException if you know 
for sure they're DefaultFileItems.  Are you positive the Exception occurs 
when trying to cast the Object returned from iter.netx() to a FileItem?

Will


>From: "Rhino" <rhino1@sympatico.ca>
>Reply-To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
>To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
>Subject: Re: FileUpload documentation confusing
>Date: Tue, 1 Jul 2003 11:28:32 -0400
>
>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
>

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


Mime
View raw message