views:

98

answers:

1

Let's say I have this method in my controller:

@RequestMapping(value="/home", method=RequestMethod.GET)
public void captcha(@RequestParam String someValue, HttpServletResponse response)
{
    System.out.println(someValue);
}

Why does the result of this request:

http://something/home?someValue=testvalue123

return this?

testvalue123,testvalue123

Using an Int only gives a single value as expected, but not String. Getting the parameter directly from the request-object also gives a single value.

A: 

does adding "test" value to the @RequestParam Annotation help:

@RequestParam("test") String someValue
smeg4brains
No, still returnes the value twice.
Tommy