commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Antwort: RE: Antwort: FileUpload: Bug in FileUploadBase::parseRequest?
Date Thu, 13 Nov 2003 09:55:17 GMT
Hi Schalk,

I don't quite understand your problem - doesn't this functionality come
with the FileUpload package?
For normal form fields, a DefaultFileItem is created, which contains all
the info of/about the form field, i.e. its name (item.getFieldName()) and
its content (item.getString()). You can assign it to any String variable...
   // Process the uploaded items                                            
   Iterator iter = items.iterator();                                        
   while (iter.hasNext()) {                                                 
       FileItem item = (FileItem);                              
       if (item.isFormField()) {                                            
           // Process a regular form field                                  
           String name = item.getFieldName();                               
           String value = item.getString();                                 
       } else {                                                             

You find this code at the Apache FileUpload website:


Steffi Rauschenbach
DB Systems GmbH
Mitarbeiterin Architekturbüro
ITR 51
999 - 16098
Internetauftritt der Deutschen Bahn AG >>


Diese E-Mail könnte vertrauliche und/oder rechtlich geschützte
Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder
diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die
unbefugte Weitergabe dieser Mail sind nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message