This week's book giveaways are in the Jython/Python and Object-Oriented programming forums. We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line! See this thread and this one for details.
I was a bit surprised the other day when I did getParameterMap().entrySet() from a J2EE Request object, the value in each entry is an array. That supports having the same key more than once in the query string. Think about whether you want to handle that.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Joe Donahue wrote:If, however, you have multiple possible values (which the query string supports, though rarely used) you would have to iterate through.
Not correct on both counts. It is very common to have multiple parameters with the same name, and the getParameterValues() method gives them to you as an array without the need for dealing with the query string.