commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Priest <>
Subject RE: [FileUpload] Multiple form inputs with same name
Date Mon, 22 Sep 2003 14:16:44 GMT
you may want to try:

// Process a regular form field
if (item.isFormField()) {
    String name = item.getFieldName();
    String value = item.getString();


Whether that will return a comma-delimited list for checkboxes I am not
sure, but that is the 
way that you are supposed to get the information out.

A while back, they authors of FileUpload were planning on changing the field
access to mimic what happens is  Java HttpServletRequest. 

So one would be able to use:

getParameter() , and in your case, 

but only they can tell you where that effort is at this particular moment.

-----Original Message-----
From: Gredler, Dani []
Sent: Monday, September 22, 2003 9:59 AM
To: ''
Subject: [FileUpload] Multiple form inputs with same name


I have a multipart form with a set of checkboxes, all of which have the same
name, plus some file inputs, all with different names. I'm migrating to Java
on the server side and am trying to use the FileUpload package to process
the requests. The problem is that I was expecting the FileItem.getString()
method to return some kind of list of the values of the checkboxes that had
been checked. Instead, I only have access to the last value checked. Under
our previous platform (MS) the getString() equivalent returned a
comma-delimited list of the values. Can anyone enlighten me?

Thanks in advance,

Dani Gredler

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

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

View raw message