Retrieving the selected items in a multiple select ddl
I have a form that contains a dropdownlist with multiple select enabled. After I submit the form to another page, I'd like to be able to retrieve the values of all the selected items, and most likely put them in a vector or an array.
Is there a way to loop through these using JSP without any javascript?
Here's an example code of the form (the "All" option is there because the values are actually retrieved from a database).
<form method="post" action="process.jsp">
<select name="test" size="4" multiple>
<option value="all" selected>All</option>
<option value="1">option 1</option>
<option value="2">option 2</option>
<option value="3">option 3</option>
<option value="4">option 4</option>
<%= options %>
</select>
<input type="submit" value="Submit">
</form>
Thanks in advance.

