you may want to try:
// Process a regular form field
if (item.isFormField()) {
String name = item.getFieldName();
String value = item.getString();
...
}
see: http://jakarta.apache.org/commons/fileupload/using.html
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,
getParameterValues()
(http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletReque
st.html#getParameterValues(java.lang.String))
but only they can tell you where that effort is at this particular moment.
-----Original Message-----
From: Gredler, Dani [mailto:[EMAIL PROTECTED]
Sent: Monday, September 22, 2003 9:59 AM
To: '[EMAIL PROTECTED]'
Subject: [FileUpload] Multiple form inputs with same name
Hi,
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]