Map<String, String[]> map = request.getParameterMap();
for (Entry<String, String[]> entry : map.entrySet())
{
String name = entry.getKey();
String[] values = entry.getValue();
String valuesStr = Arrays.toString(values).trim();
LOGGER.warn(valuesStr);
I'm trying to look at a request parameter value using the code above.
Why does Arrays.toString(values).trim();
bracket the parameter value so it looks like this:
[Georgio]
What's the best way to get the String here without the brackets?
If I do this:
String valuesStr = values[0].trim();
it seems there is a risk of losing subsequent values in the array.