I just noticed that a @RequestParam variable that I use to check POST params, such as usernames, or ids, behaves rather strangely when the controller method gets called consecutive times. Rather than returning the current parameter value (for example, "Jason", "Michael", "John"), it returns a concatenated string of all parameter values that the method has been called with before that. It results in the variable having the value of: "Jason,Michael,John", rather than just "John" which was the last one.
I noticed that this strange behavior is per session. When I reduced the session duration to 1 minute only, i noticed that after the session is gone, so are the multiple values.
This thing never happens if I call request.getParameter("username"). Of course, I would like to stick to Spring MVC conventions if possible.
Is this a bug, or something intentional? How can I avoid it?