I am developing a web application where I have this form
<form name="form" action="create-user" method="post"> <input name="accept" type="checkbox"><span>{{acceptLegalTerms}}</span><br> <input type="submit" value="{{Continue}}" class="primary fright"/> </form>
On the server side, we use Jersey (on GAE). And here is what I am trying to use to read POST values
@POST @Consumes(MediaType.MULTIPART_FORM_DATA) @Path("create-user") public Response createUser(@FormDataParam("accept") boolean acceptForm) { return Response.ok().entity(acceptForm).build(); }
But that doesn't work ... He brings me back ...
HTTP ERROR 415 Problem accessing /login/create-user. Reason: Unsupported Media Type
Any ideas? What am I doing wrong?
Thanks!
source share