title: Spring 3 MVC Request parameter mapping. Two parameters from the same class while calling a handler in the controller
body: <p>I am trying to figure out how to pass two different parameters of the same class through the URL to a handler method in the controller. For example, given a "Foo" class with an "id" parameter(I am saying just one parameter to keep it simple, but think from a class with loads of them), the code of the controller looks as it follows:</p>
  
  <pre><code>@Controller(value = "customerCareRemoteService")
  public class CustomerCareRemoteServiceImpl {
  
  // Othe methods/requests
  
      @RequestMapping(value = "/" + "prueba" , method = RequestMethod.GET)
      public @ResponseBody String prueba(Foo pFoo1, Foo pFoo2) {
          //stupid and not interesting code
          String answer = "pFoo1.id is " + pFoo1.id + ". pFoo2.id is " + pFoo2.id.";
          System.out.println(answer);
          return answer;
  
      }
  
  }
  </code></pre>
  
  <p>So, when I call this method, there is no way to differ between the two parameters:</p>
  
  <pre><code>http://myfakeurl/prueba?id=1&amp;id=2
  </code></pre>
  
  <p>How should I deal with that? Is there any way to "prefix" the parameters? I have seen @RequestParam but it does not work for me, because it can not be used with my very own and beauty personal classes(or am I wrong?). Also I would like to avoid wrapper classes. Thank you for your time.</p>