title: @context httpServletRequest request for post method in jersey is null
body: <p>I am getting multipart msg from android client. I am using jersey webservice to receive that multipart data. I can able to retrieve multipart data. but I can't able to use <code>@Context HttpServletRequest</code> request to get user id. My android client is,</p>
  
  <pre><code>HttpClient httpClient = new DefaultHttpClient();
  
  Log.e("Picture Upload URL is:", QueryConfig.PROTOCOL+ StaticHelper.HOST + StaticHelper.port+QueryConfig.projectService+QueryConfig.sendProfilePicture);
  
  HttpPost postRequest = new HttpPost(QueryConfig.PROTOCOL+ StaticHelper.HOST + StaticHelper.port+QueryConfig.projectService+QueryConfig.sendProfilePicture);
  
  ByteArrayBody bab = new ByteArrayBody(data,StaticHelper.UserID+".jpg");
  MultipartEntity reqEntity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
  reqEntity.addPart("file", bab);
  reqEntity.addPart("fileFilename",new StringBody(StaticHelper.UserID+".jpg"));
  HttpResponse response = httpClient.execute(postRequest);
  </code></pre>
  
  <p>my jersey service is</p>
  
  <pre><code>@Path("/mobileUserPictureInsert")
  @POST
  @Consumes("multipart/*")
  @Produces(MediaType.APPLICATION_JSON)
  public String save(@Context HttpServletRequest request, MultiPart multiPart)
          throws ParseException {
      BodyPartEntity bpeTokenId = (BodyPartEntity) multiPart.getBodyParts()
              .get(2).getEntity();
      try {
          tokenId = getString(bpeTokenId.getInputStream());
          String userId = "";
          userId = getSession(tokenId, request);
  </code></pre>
  
  <p>the get session method is</p>
  
  <pre><code>protected String getSession(String token, HttpServletRequest req)
          throws ServletException, IOException {
  
      String value = (String) context.getAttribute(token);
  
      LOG.info("Retrive Token Value--&gt;" + value);
  
      return value;
  }
  </code></pre>
  
  <p>Here i am passing the request and token generated to retrieve user id. it works for get method. but for post method i am getting null value. pl help me. how to get request for post method in jersey.</p>