title: RequestBody of a REST application
body: <p>Iam bit new to SpringMVC REST concept. Need a help from experts here to understand/ resolve following issue,
  I have developed a SpringMVC application, following is a part of a controller class code, and it works perfectly ok with the way it is, meaning it works ok with the JSON type object, </p>
  
  <pre><code>@RequestMapping(method = RequestMethod.POST, value = "/user/register")
  public ModelAndView addUser( @RequestBody String payload) {
  
      try{
  
          ObjectMapper mapper = new ObjectMapper();
          CreateNewUserRequest request = mapper.readValue(payload, CreateNewUserRequest.class);
  
          UserBusiness userBusiness = UserBusinessImpl.getInstance();
          CreateNewUserResponse response = userBusiness.createNewUser(request);
  
  
          return new ModelAndView(ControllerConstant.JASON_VIEW_RESOLVER, "RESPONSE", response);
  </code></pre>
  
  <p>and this is my rest-servlet.xml looks like</p>
  
  <pre><code>&lt;bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" /&gt;
  &lt;bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" /&gt;
  
  &lt;bean id="jsonViewResolver" class="org.springframework.web.servlet.view.json.MappingJacksonJsonView" /&gt;
  &lt;bean id="viewResolver" class="org.springframework.web.servlet.view.BeanNameViewResolver" /&gt;
  
  
  &lt;bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"&gt;
      &lt;property name="messageConverters"&gt;
          &lt;list&gt;
              &lt;ref bean="jsonConverter" /&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jsonConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"&gt;
          &lt;property name="supportedMediaTypes" value="application/json" /&gt;
  &lt;/bean&gt; 
  
  &lt;bean name="UserController" class="com.tap.mvp.controller.UserController"/&gt;
  </code></pre>
  
  <p>My problem is how do i make it work for normal POST request, My controller should not accept JSON type object instead it should work for normal HTTP POST variables.
  How do i get values from the request?What are the modifications should i need to be done for that. I need to get rid of </p>
  
  <pre><code>ObjectMapper mapper = new ObjectMapper();
          CreateNewUserRequest request = mapper.readValue(payload, CreateNewUserRequest.class);
  </code></pre>
  
  <p>and instead need to add way to create an instance of </p>
  
  <blockquote>
    <p>CreateNewUserRequest</p>
  </blockquote>
  
  <p>class, by invoking its constructor. For that i need to get values from request. How do i do that? Can i treat <strong>@RequestBody String payload</strong> as a map and get the values? or is there a specific way to get values from the request of HTTP POST method? following values will be in the request,</p>
  
  <blockquote>
    <p>firstName, lastName, email,password</p>
  </blockquote>