Subject: problem in retrieving data from <selecet multiple> tag using common
file upload

have a form, *enctype="multipart/form-data"*, with one

<select name="XX" multiple="multiple">


which allows the user to select multiple options. When handling the POST
using Apache Commons FileUpload, I detect the *select* field via

// Process a regular form field

if {item.isFormField()) {
    String name = item.getFieldName();

    String value = item.getString();
}

The problem I'm having is that *item.getString();* returns only the first
selected value from the *select* field; no matter how many items I pick, I
only get the first item.

Likewise, when I use the standard servlet method for parameter extraction,
ie.

final String[] values = request.getParameterValues("XX");


values is empty, which I assume is because the form is encoded multipart.

How can I retrieve these multiple selected values from my multi-select
field?





Thanks

Anand Shankar

Reply via email to