title: Get body content using HttpServletRequest in Jersey
body: <p>I am using Jersey 1.7 and I am trying to access the request body in my method very similar to this question:
  <a href="https://stackoverflow.com/questions/6097166/how-do-i-read-post-parameters-for-a-restful-service-using-jersey">How do I read POST parameters for a RESTful service using Jersey?</a>
  Body value comes in fine as email=xx@ws.com&amp;password=test1</p>
  
  <p>I tried using @Context HttpServletRequest request and tried to access the email with request.getParameter("email") but get nothing. There is nothing inside request.getparameterMap() either.</p>
  
  <p>My API looks like this:
  @POST
  @Produces(...)
  public Response getData(@FormParam("email") String email, @FormParam("password") String password, String body, @Context HttpServletRequest request) { ....</p>
  
  <p>I tried changing the position of String body and request but to no avail.</p>
  
  <p>The String body gets the value perfectly fine(it is coming from an iPhone device and not through a Form Submit and so shows up in the String body). Right now, I am trying to parse the body content(email=xx@ws.com&amp;password=test1) and get each variable like email out but that is painful.</p>
  
  <p>Is there some way to get the values using request.getParameter("email") ?</p>
  
  <p>Or is there any quick utility to convert the body content into String email and String password ?</p>
  
  <p>TIA,
  Vijay</p>