tags:

views:

34

answers:

4

I am using a multiple options select in my HTML form, when I select more than one option and use the 'GET' method in my form I see this

url?Ripples=1.3&Ripples=1.4

As you can see each selection has the same name, when I pass this to my jsp and display the variable I only get this first option which in this case is 1.3. How do I get all the selections into my java strings?

A: 
request.getParameterValues("Ripples")
Maurice Perry
A: 

request.getParameterValues(argument) will return a list of the selected items.

JiminyCricket
+4  A: 

you can use

String[] ripples = request.getParameterValues("Ripples");
Thanks works a treat!
A: 

Ideally this should be handled by a POST request.

Tushar Tarkas