HttpServletRequest.getParameterValues()
returns a String[]
containing all values of a given HTTP request parameter. Does anyone know if the order of the values in this array is guaranteed by specification to by the same as the order which those values were passed through in the request?
For example, if I have the GET query string x=1&x=2&x=3
, am I guaranteed to receive the String[] {"1", "2", "3"}
when I call getParameterValues()
? It seems to work in practice, but I can't find anything which specifies that this must be the case, so I'm reluctant to rely on it.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…