The Javadoc for getParameter
clearly says
You should only use this method when you are sure the parameter has only one value. If the parameter might have more than one value, use getParameterValues(java.lang.String).
And getParameterValues
returns a String[]
, which is what you want.