Home » Java » Receive Multipart FormData – Jersey 1.19.1 REST

Receive Multipart FormData – Jersey 1.19.1 REST

Posted by: admin October 26, 2017 Leave a comment


I am sending multipart/form-data request but I am unable to get FormData values in Jersey 1.19.1 as @FormDataParam is not available. I am trying with the following code but I got strucked. Is there a way to resolve it in this Jersey version?

public String uploadFile(@Context HttpContext hc) {
   HttpRequestContext request = hc.getRequest();

   return null;

Thanks in advance.


Maybe you need this extension: https://mvnrepository.com/artifact/com.sun.jersey.contribs/jersey-multipart

i think in thex 1.x jersey universe this was seperated.

here is an example blog post: